User::chkPassword
James Cobban edited this page May 31, 2021
·
3 revisions
Up: class User
This determines whether the supplied password matches that for the User
. It has two parameters:
parameter | description |
---|---|
$newpassword | The external user-entered password value as a string to check. |
$persist | If this is true then the request is for a user logging on to the site. This method generates a persistent session identifier which is used to avoid the user having to log on for each subsequent access. If it is false or omitted, or the $newpassword is invalid, the persistent session identifier is set to null . |
The supplied password string is converted into a salted hash value and that value is compared to the field 'shapassword'
. If the two hash values match this returns true
, otherwise it returns false
.
Next: $user->save($xml)