@@ 361-363 (lines=3) @@ | ||
358 | { |
|
359 | $oldRegisterFields = $this->module->registrationFields; |
|
360 | $this->module->registrationFields = ['password', 'name']; |
|
361 | if ($this->getIsNewRecord() == false) { |
|
362 | throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user'); |
|
363 | } |
|
364 | $generatedPassword = false; |
|
365 | if (empty($this->password)) { |
|
366 | // password autogenerate |
|
@@ 394-396 (lines=3) @@ | ||
391 | */ |
|
392 | public function register() |
|
393 | { |
|
394 | if ($this->getIsNewRecord() == false) { |
|
395 | throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user'); |
|
396 | } |
|
397 | if (!$this->module->enableRegistration) { |
|
398 | $this->addError('registration', Yii::t('activeuser_general', 'Registration is not available')); |
|
399 | return false; |