コード例 #1
0
ファイル: PasswordValidator.php プロジェクト: hugutux/booked
 public function Validate()
 {
     $pw = new Password($this->currentPasswordPlainText, $this->user->encryptedPassword);
     $this->isValid = $pw->Validate($this->user->passwordSalt);
 }
コード例 #2
0
ファイル: user.php プロジェクト: michalkoczwara/WebGoatPHP
 /**
 	Validates a user credentials
     @param Username of the user
     @param Password of the user
     @return boolean
 */
 function ValidateUserCredentials($Username, $Password)
 {
     $Record = jf::SQL("SELECT * FROM {$this->TablePrefix()}users WHERE LOWER(Username)=LOWER(?)", $Username);
     if (!$Record) {
         return false;
     }
     $Record = $Record[0];
     return Password::Validate($Username, $Password, $Record['Password'], $Record['Salt'], $Record['Protocol']);
 }