src/Service/MelisCoreLostPasswordService.php
public function addLostPassRequest($login, $email)
    {
        $table = $this->getServiceLocator()->get('MelisLostPasswordTable');
        $data = $this->getPassRequestDataByLogin($email);
        $success = false;
        if(!$this->isDataExists($login)) {
            $table->save(array(
                'rh_id' => null,
                'rh_login' => $login,
                'rh_email' => $email,
                'rh_hash' => $this->generateHash(),
                'rh_date' => date('Y-m-d H:i:s')
            ));
            // first email
            $success = $this->sendPasswordLostEmail($login, $email);
            
        }
        else {
            // resend email
            $table->update(array(
                'rh_date' => date('Y-m-d H:i:s')
            ), 'rh_login', $login);
            $success = $this->sendPasswordLostEmail($login, $email);
        }
        
        return $success;
    }
public function addLostPassRequest($login, $email)
    {
        $table = $this->getServiceLocator()->get('MelisLostPasswordTable');
        $data = $this->getPassRequestDataByLogin($email);
        $success = false;
        if(!$this->isDataExists($login)) {
            $table->save(array(
                'rh_id' => null,
                'rh_login' => $login,
                'rh_email' => $email,
                'rh_hash' => $this->generateHash(),
                'rh_date' => date('Y-m-d H:i:s')
            ));
            // first email
            $success = $this->sendPasswordLostEmail($login, $email);
            
        }
        else {
            // resend email
            $table->update(array(
                'rh_date' => date('Y-m-d H:i:s')
            ), 'rh_login', $login);
            $success = $this->sendPasswordLostEmail($login, $email);
        }
        
        return $success;
    }
public function addLostPassRequest ( $ login , $ email ) { $ table = $ this -> getServiceLocator ( ) -> get ( 'MelisLostPasswordTable' ) ; $ data = $ this -> getPassRequestDataByLogin ( $ email ) ; $ success = false ; if ( ! $ this -> isDataExists ( $ login ) ) { $ table -> save ( array ( 'rh_id' => null , 'rh_login' => $ login , 'rh_email' => $ email , 'rh_hash' => $ this -> generateHash ( ) , 'rh_date' => date ( 'Y-m-d H:i:s' ) ) ) ; // first email $ success = $ this -> sendPasswordLostEmail ( $ login , $ email ) ; } else { // resend email $ table -> update ( array ( 'rh_date' => date ( 'Y-m-d H:i:s' ) ) , 'rh_login' , $ login ) ; $ success = $ this -> sendPasswordLostEmail ( $ login , $ email ) ; } return $ success ; }
Adds new record for lost password request
@param String $url
@param String $login
@param String $email
Adds new record for lost password request