Created
December 31, 2014 04:22
-
-
Save dcb9/472d7b5ddba15ec2bb1e to your computer and use it in GitHub Desktop.
yii2 给用户重新设置密码的步骤
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use common\models\User; | |
$user = User::findOne($user_id); | |
$user->setPassword($your_password); | |
$user->generateAuthKey(); | |
$user->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment