Commit 46746dac by Alexander Makarov

Fixes #6514: advanced application SignupForm::signup() should not return User…

Fixes #6514: advanced application SignupForm::signup() should not return User model if saving failed
parent e75e233d
......@@ -48,8 +48,9 @@ class SignupForm extends Model
$user->email = $this->email;
$user->setPassword($this->password);
$user->generateAuthKey();
$user->save();
return $user;
if ($user->save()) {
return $user;
}
}
return null;
......
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