/** * Reset the given user's password. * * @param \Illuminate\Contracts\Auth\CanResetPassword $user * @param string $password * @return void */ protected function resetPassword($user, $password) { $user->forceFill(['password' => bcrypt($password), 'remember_token' => Str::random(60)])->save(); $this->guard()->login($user); }
/** * Reset the given user's password. * * @param \Illuminate\Contracts\Auth\CanResetPassword $user * @param string $password * * @return void */ protected function resetPassword($user, $password) { $user->forceFill(['password' => $password, 'remember_token' => str_random(60)])->save(); \Auth::guard($this->getGuard())->login($user); }