- Добавлен метод возвращающий fio

parent dbfbd1d0
......@@ -519,12 +519,21 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
return false;
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 true;
}
public function getFio()
{
$result = $this->name;
if (isset($this->surname) && strlen($this->surname)>0) {
$result .= ' '.$this->surname;
}
return $result;
}
public function 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