File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,8 @@ public function validateAuthKey($authKey)
258
258
}
259
259
260
260
/**
261
- * Creates new user account. It generates password if it is not provided by user.
261
+ * Creates new user account. If Module::enableGeneratingPassword is set true, this method
262
+ * will generate password.
262
263
*
263
264
* @return bool
264
265
*/
@@ -271,7 +272,7 @@ public function create()
271
272
$ transaction = $ this ->getDb ()->beginTransaction ();
272
273
273
274
try {
274
- $ this ->password = $ this ->password == null ? Password::generate (8 ) : $ this ->password ;
275
+ $ this ->password = ( $ this ->password == null && $ this -> module -> enableGeneratingPassword ) ? Password::generate (8 ) : $ this ->password ;
275
276
276
277
$ this ->trigger (self ::BEFORE_CREATE );
277
278
You can’t perform that action at this time.
0 commit comments