App\Modules\System\Controllers\Authorize::postRemind PHP Method

postRemind() public method

Handle a POST request to remind a User of their password.
public postRemind ( ) : Response
return Response
    public function postRemind()
    {
        $error = array();
        // Verify the reCAPTCHA
        if (!ReCaptcha::check()) {
            $status = __d('system', 'Invalid reCAPTCHA submitted.');
            return Redirect::back()->withStatus($status, 'danger');
        }
        //
        $credentials = Input::only('email');
        switch ($response = Password::remind($credentials)) {
            case Password::INVALID_USER:
                $status = __d('system', 'We can\'t find a User with that e-mail address.');
                return Redirect::back()->withStatus($status, 'danger');
            case Password::REMINDER_SENT:
                $status = __d('system', 'Reset instructions have been sent to your email address');
                return Redirect::back()->withStatus($status);
        }
    }