public function generateResetToken()
    {
        // Retrieve data
        $email = $email = Input::get('email');

        // Validate that an API user model has been specified
        if (empty(config('nodes.api.auth.model'))) {
            throw new MissingUserModelException('No API auth model has been specified');
        }

        // Validate e-mail
        if (empty($email) || ! filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw (new Exception('Missing or invalid e-mail address', 412))->setStatusCode(412);
        }

        // Generate token and send e-mail
        $this->resetPasswordRepository->sendResetPasswordEmail(['email' => $email]);

        return $this->response->content([
            'email' => 'sent',
        ]);
    }
public function generateResetToken()
    {
        // Retrieve data
        $email = $email = Input::get('email');

        // Validate that an API user model has been specified
        if (empty(config('nodes.api.auth.model'))) {
            throw new MissingUserModelException('No API auth model has been specified');
        }

        // Validate e-mail
        if (empty($email) || ! filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw (new Exception('Missing or invalid e-mail address', 412))->setStatusCode(412);
        }

        // Generate token and send e-mail
        $this->resetPasswordRepository->sendResetPasswordEmail(['email' => $email]);

        return $this->response->content([
            'email' => 'sent',
        ]);
    }
public function generateResetToken ( ) { // Retrieve data $ email = $ email = Input :: get ( 'email' ) ; // Validate that an API user model has been specified if ( empty ( config ( 'nodes.api.auth.model' ) ) ) { throw new MissingUserModelException ( 'No API auth model has been specified' ) ; } // Validate e-mail if ( empty ( $ email ) || ! filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { throw ( new Exception ( 'Missing or invalid e-mail address' , 412 ) ) -> setStatusCode ( 412 ) ; } // Generate token and send e-mail $ this -> resetPasswordRepository -> sendResetPasswordEmail ( [ 'email' => $ email ] ) ; return $ this -> response -> content ( [ 'email' => 'sent' , ] ) ; }
Generate reset password token and send it on e-mail.

@author Morten Rugaard <moru@nodes.dk>

@return \Nodes\Api\Http\Response
@throws \Nodes\Api\Auth\Exceptions\MissingUserModelException
@throws \Nodes\Exceptions\Exception
Generate reset password token and send it on e - mail .