public function Validate() { $pw = new Password($this->currentPasswordPlainText, $this->user->encryptedPassword); $this->isValid = $pw->Validate($this->user->passwordSalt); }
/** 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']); }