applications/dashboard/controllers/class.entrycontroller.php
public function PasswordRequest() {
      Gdn::Locale()->SetTranslation('Email', T(UserModel::SigninLabelCode()));
      if ($this->Form->IsPostBack() === TRUE) {
         $this->Form->ValidateRule('Email', 'ValidateRequired');

         if ($this->Form->ErrorCount() == 0) {
            try {
               $Email = $this->Form->GetFormValue('Email');
               if (!$this->UserModel->PasswordRequest($Email)) {
                  $this->Form->SetValidationResults($this->UserModel->ValidationResults());
               }
            } catch (Exception $ex) {
               $this->Form->AddError($ex->getMessage());
            }
            if ($this->Form->ErrorCount() == 0) {
               $this->Form->AddError('Success!');
               $this->View = 'passwordrequestsent';
            }
         } else {
            if ($this->Form->ErrorCount() == 0)
               $this->Form->AddError("Couldn't find an account associated with that email/username.");
         }
      }
      $this->Render();
   }
public function PasswordRequest() {
      Gdn::Locale()->SetTranslation('Email', T(UserModel::SigninLabelCode()));
      if ($this->Form->IsPostBack() === TRUE) {
         $this->Form->ValidateRule('Email', 'ValidateRequired');

         if ($this->Form->ErrorCount() == 0) {
            try {
               $Email = $this->Form->GetFormValue('Email');
               if (!$this->UserModel->PasswordRequest($Email)) {
                  $this->Form->SetValidationResults($this->UserModel->ValidationResults());
               }
            } catch (Exception $ex) {
               $this->Form->AddError($ex->getMessage());
            }
            if ($this->Form->ErrorCount() == 0) {
               $this->Form->AddError('Success!');
               $this->View = 'passwordrequestsent';
            }
         } else {
            if ($this->Form->ErrorCount() == 0)
               $this->Form->AddError("Couldn't find an account associated with that email/username.");
         }
      }
      $this->Render();
   }
public function PasswordRequest ( ) { Gdn :: Locale ( ) -> SetTranslation ( 'Email' , T ( UserModel :: SigninLabelCode ( ) ) ) ; if ( $ this -> Form -> IsPostBack ( ) === TRUE ) { $ this -> Form -> ValidateRule ( 'Email' , 'ValidateRequired' ) ; if ( $ this -> Form -> ErrorCount ( ) == 0 ) { try { $ Email = $ this -> Form -> GetFormValue ( 'Email' ) ; if ( ! $ this -> UserModel -> PasswordRequest ( $ Email ) ) { $ this -> Form -> SetValidationResults ( $ this -> UserModel -> ValidationResults ( ) ) ; } } catch ( Exception $ ex ) { $ this -> Form -> AddError ( $ ex -> getMessage ( ) ) ; } if ( $ this -> Form -> ErrorCount ( ) == 0 ) { $ this -> Form -> AddError ( 'Success!' ) ; $ this -> View = 'passwordrequestsent' ; } } else { if ( $ this -> Form -> ErrorCount ( ) == 0 ) $ this -> Form -> AddError ( "Couldn't find an account associated with that email/username." ) ; } } $ this -> Render ( ) ; }
Request password reset.

@access public
@since 2.0.0
Request password reset .