Commit e306394d by Alexander Kochetov

Advanced app `User` model code style fixes

parent 41177b02
...@@ -141,7 +141,7 @@ class User extends ActiveRecord implements IdentityInterface ...@@ -141,7 +141,7 @@ class User extends ActiveRecord implements IdentityInterface
*/ */
public function validatePassword($password) 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 ...@@ -151,7 +151,7 @@ class User extends ActiveRecord implements IdentityInterface
*/ */
public function setPassword($password) 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 ...@@ -159,7 +159,7 @@ class User extends ActiveRecord implements IdentityInterface
*/ */
public function generateAuthKey() 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 ...@@ -167,7 +167,7 @@ class User extends ActiveRecord implements IdentityInterface
*/ */
public function generatePasswordResetToken() 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