本文整理汇总了PHP中Password::remind方法的典型用法代码示例。如果您正苦于以下问题:PHP Password::remind方法的具体用法?PHP Password::remind怎么用?PHP Password::remind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Password
的用法示例。
在下文中一共展示了Password::remind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
$response = Password::remind(Input::only('email'), function ($message) {
$message->subject('Password Reminder');
});
return Redirect::to('password/reminded');
}
示例2: request
/**
* Envia un missatge amb un enllaç per recuperar el compte
*/
public function request()
{
$credentials = array('email_estudiant' => Input::get('email'));
return Password::remind($credentials, function ($message, $user) {
$message->subject('Workshome - Recuperación de cuenta');
});
}
示例3: requestAction
public function requestAction()
{
if (Input::server("REQUEST_METHOD") == "POST") {
$rules = array("email" => "required");
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
//validation failed
Session::flash('status_error', 'Sorry, you entered an incorrect email.');
return Redirect::route("user/request");
} else {
//validation passed
$email = Input::get("email");
try {
$userEmail = User::where('email', $email)->firstOrFail();
$credentials = array('email' => $userEmail->email);
Password::remind($credentials, function ($message) {
$message->subject("The App password reset form");
});
Session::flash('status_success', 'Email has been sent to ' . Input::get('email') . '.');
return Redirect::route("user/request");
} catch (Exception $e) {
Session::flash('status_error', 'Sorry, you entered an incorrect email or user with such email does not exist.12');
return Redirect::route("user/request");
}
}
//end validation
}
}
开发者ID:AxelPardemann,项目名称:E-Learning-System-based-on-Laravel-and-Bootstrap,代码行数:28,代码来源:UserController.php
示例4: postRemind
/**
* Send an email to reset your password.
*/
public function postRemind()
{
$credentials = array('email' => Input::get('email'));
return Password::remind($credentials, function ($message, $user) {
$message->subject('Reset your password');
});
}
示例5: postRemind
public function postRemind()
{
Password::remind(Input::only('email'), function ($message) {
$message->subject('Password Reminder');
});
return Redirect::to('/account')->with('global', '<div class="alert alert-success" role="alert">An email with password reset has been sent.</div>');
}
示例6: send
public function send()
{
//Manage sending of the email and validate input.
$credentials = array('email' => Input::get('email'));
return Password::remind($credentials, function ($message, $user) {
$message->subject('Your Open Source Collaborative Consumption Marketplace Password Reset');
});
}
示例7: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
switch ($response = Password::remind(Input::only('email'))) {
case Password::INVALID_USER:
return Redirect::back()->with('message', array('type' => 'danger', 'text' => 'Something went wrong. Please try again.'));
case Password::REMINDER_SENT:
return Redirect::back()->with('status', Lang::get($response))->with('message', array('type' => 'success', 'text' => 'Password reminder sent! Check your inbox or spam folder to reset your password'));
}
}
示例8: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return \Illuminate\Http\Response
*/
public function postRemind()
{
switch ($response = Password::remind(Input::only('email'))) {
case Password::INVALID_USER:
return Redirect::route('password.remind')->with('message', 'Your email is invalid');
case Password::REMINDER_SENT:
return Redirect::route('password.remind')->with('message', 'The password reminder has been sent. Check your email')->with('messageType', "success");
}
}
示例9: sendPasswordRequest
/**
* Send user password-reset code
*/
public function sendPasswordRequest()
{
$user = $this->user;
$email = $user->email;
Password::remind(compact('email'), function ($message, $user) {
$message->subject('Your Password Reminder');
});
Session::flash('sent_password_request', $email);
}
示例10: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
switch ($response = Password::remind(Input::only('email'))) {
case Password::INVALID_USER:
return Redirect::back()->with('error', Lang::get($response));
case Password::REMINDER_SENT:
return Redirect::back()->with('status', Lang::get($response));
}
}
示例11: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
$this->forgotPasswordForm->validate(Input::only('email'));
switch ($response = Password::remind(Input::only('email'))) {
case Password::INVALID_USER:
return Redirect::back()->withErrorMessage(Lang::get($response));
case Password::REMINDER_SENT:
return Redirect::back()->withFlashMessage(Lang::get($response));
}
}
示例12: request
public function request()
{
$response = Password::remind(Input::only('email'), function ($message, $user) {
$message->subject(Lang::get('users.reset'));
});
if ($response == Password::INVALID_USER) {
return Redirect::back()->with('error', Lang::get($response));
} else {
return Redirect::back()->with('success', Lang::get($response));
}
}
示例13: store
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function store()
{
switch ($response = Password::remind(Input::only('email'), function ($message) {
$message->subject('Reconfiguración solicitada en Qdental');
})) {
case Password::INVALID_USER:
return Redirect::back()->with('error', Lang::get($response));
case Password::REMINDER_SENT:
return Redirect::back()->with('status', Lang::get($response));
}
}
示例14: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
$email = Input::only('email');
$email = $email['email'];
switch ($response = Password::remind(Input::only('email'))) {
case Password::INVALID_USER:
return Redirect::back()->with('message', Lang::get($response));
case Password::REMINDER_SENT:
return View::make('register.find_password_ok', compact('email'));
}
}
示例15: postRemind
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
switch ($response = Password::remind(Input::only('email'), function ($message) {
$message->subject('SeAT Password Reset');
})) {
case Password::INVALID_USER:
return Redirect::back()->withErrors(Lang::get($response));
case Password::REMINDER_SENT:
return Redirect::action('SessionController@getSignIn')->with('success', Lang::get($response));
}
}