本文整理汇总了PHP中Illuminate\Contracts\Auth\CanResetPassword::save方法的典型用法代码示例。如果您正苦于以下问题:PHP CanResetPassword::save方法的具体用法?PHP CanResetPassword::save怎么用?PHP CanResetPassword::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Auth\CanResetPassword
的用法示例。
在下文中一共展示了CanResetPassword::save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword|User|ServiceUser $user
* @param string $password
*/
protected function resetPassword($user, $password)
{
$user->password_text = bcrypt($password);
$user->save();
/** @noinspection PhpUndefinedMethodInspection */
Auth::login($user);
}
示例2: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$passwordService = new PasswordService();
$user->user_pass = $passwordService->wp_hash_password($password);
$user->save();
Auth::guard($this->getGuard())->login($user);
}
示例3: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password = bcrypt($password);
$user->save();
event(new UserPasswordChanged($user, $password));
Auth::login($user);
}
示例4: sendNewPassword
public function sendNewPassword(CanResetPassword $user)
{
$password = str_random(8);
$user->password = $password;
$user->save();
$this->mailer->send('auth::emails.new_password', compact('user', 'password'), function ($m) use($user) {
$m->to($user->getEmailForPasswordReset());
});
}
示例5: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
// Do not crypt the password here, the User model does it.
$user->password = $password;
$user->save();
$user->emailPasswordChange();
Auth::login($user);
}
示例6: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password_301 = bcrypt($password);
$user->save();
// if redirect to user zone, we set new user on Auth
//auth($this->getGuard())->login($user);
}
示例7: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @author Cali
*/
protected function resetPassword($user, $password)
{
$user->password = bcrypt($password);
$user->save();
Auth::guard($this->getGuard())->login($user);
}
示例8: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
//$user->password = bcrypt($password);
// Sentry hashes password for us
$user->password = $password;
$user->save();
//Auth::login($user);
}
示例9: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password = bcrypt($password);
$user->save();
$this->auth->login($user);
}
示例10: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password = $password;
$user->save();
auth()->login($user);
}
示例11: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
/*
* --------------------------------------------------------------------------
* Update password
* --------------------------------------------------------------------------
* Hash new password and update database related the user.
*/
$user->password = bcrypt($password);
$user->save();
/*
* --------------------------------------------------------------------------
* Send email notification
* --------------------------------------------------------------------------
* Make sure user is noticed by email information that they recently change
* their password.
*/
Mail::send('emails.admin.reset', ['name' => $user->name], function ($message) use($user) {
$message->from(env('MAIL_ADDRESS', 'no-reply@infogue.id'), env('MAIL_NAME', 'Infogue.id'));
$message->replyTo('no-reply@infogue.id', env('MAIL_NAME', 'Infogue.id'));
$message->to($user->email)->subject('Password has been reset');
});
Auth::guard($this->getGuard())->login($user);
}
示例12: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
*/
protected function resetPassword($user, $password)
{
$user->password = bcrypt($password);
$user->save();
$this->fireEvent('reset.success', request(), 'Password reset', false);
auth()->login($user);
}
示例13: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password = $password;
// no need to bcrypt here as passwords are automatically hashed in User Model
$user->save();
Auth::login($user);
}
示例14: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->passwd = Hash::make($user . $password);
$user->save();
Auth::login($user);
}
示例15: resetPassword
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password = bcrypt($password);
$user->save();
Auth::login($user);
}