Commit 6bd653b6 authored by Олег Гиммельшпах's avatar Олег Гиммельшпах

Merge branch 'master' of git.task-on.com:ktask/task-on.com

parents 9b1a1ead 2dc24fca
...@@ -519,12 +519,21 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -519,12 +519,21 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
return false; return false;
if ($this->scenario===self::SCENARIO_REGISTRATION) { if ($this->scenario===self::SCENARIO_REGISTRATION) {
if (!$this->afterRegistration(['email' => $this->email, 'user_fio' => $this->fio])) if (!$this->afterRegistration(['email' => $this->email, 'user_fio' => $this->getFio()]))
return false; return false;
} }
return true; return true;
} }
public function getFio()
{
$result = $this->name;
if (isset($this->surname) && strlen($this->surname)>0) {
$result .= ' '.$this->surname;
}
return $result;
}
public function beforeDelete() public function beforeDelete()
{ {
if (parent::beforeDelete()) if (parent::beforeDelete())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment