api/forms/ChangeEmail.php 1 location
|
@@ 58-65 (lines=8) @@
|
55 |
|
* Validates the user's current password |
56 |
|
* @inheritdoc |
57 |
|
*/ |
58 |
|
public function validatePassword($attributes, $params) |
59 |
|
{ |
60 |
|
if (!$this->hasErrors()) { |
61 |
|
if (!$this->user->validatePassword($this->password_current)) { |
62 |
|
$this->addError('password_current', Yii::t('yrc', 'The provided password is not valid')); |
63 |
|
} |
64 |
|
} |
65 |
|
} |
66 |
|
|
67 |
|
/** |
68 |
|
* Changes the user's email address |
api/forms/ResetPassword.php 1 location
|
@@ 86-93 (lines=8) @@
|
83 |
|
* Validates the user's current password |
84 |
|
* @inheritdoc |
85 |
|
*/ |
86 |
|
public function validatePassword($attributes, $params) |
87 |
|
{ |
88 |
|
if (!$this->hasErrors()) { |
89 |
|
if (!$this->user->validatePassword($this->password_current)) { |
90 |
|
$this->addError('password_current', Yii::t('yrc', 'The provided password is not valid')); |
91 |
|
} |
92 |
|
} |
93 |
|
} |
94 |
|
|
95 |
|
/** |
96 |
|
* Validates the users email |