Commit db923f86 by Alexander Makarov

Merge pull request #4246 from creocoder/advanced-app-user-model-code-style-fixes

Advanced app `User` model code style fixes
parents 41177b02 e306394d
......@@ -141,7 +141,7 @@ class User extends ActiveRecord implements IdentityInterface
*/
public function validatePassword($password)
{
return Yii::$app->getSecurity()->validatePassword($password, $this->password_hash);
return Yii::$app->security->validatePassword($password, $this->password_hash);
}
/**
......@@ -151,7 +151,7 @@ class User extends ActiveRecord implements IdentityInterface
*/
public function setPassword($password)
{
$this->password_hash = Yii::$app->getSecurity()->generatePasswordHash($password);
$this->password_hash = Yii::$app->security->generatePasswordHash($password);
}
/**
......@@ -159,7 +159,7 @@ class User extends ActiveRecord implements IdentityInterface
*/
public function generateAuthKey()
{
$this->auth_key = Yii::$app->getSecurity()->generateRandomKey();
$this->auth_key = Yii::$app->security->generateRandomKey();
}
/**
......@@ -167,7 +167,7 @@ class User extends ActiveRecord implements IdentityInterface
*/
public function generatePasswordResetToken()
{
$this->password_reset_token = Yii::$app->getSecurity()->generateRandomKey() . '_' . time();
$this->password_reset_token = Yii::$app->security->generateRandomKey() . '_' . time();
}
/**
......
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