Navigation

Search

ssi_checkPassword

Description

This function checks the user's password.

Syntax

bool ssi_checkPassword (mixed $id, string $password[, bool $is_username])



Parameter $id

Expected type: Mixed
Description: The user id or username (if this is a username, then is_username needs to be true).

Allowed types for $id
Allowed values Description
Integer Their user ID
String Their username



Parameter $password

Expected type: String
Description: The password that the user entered.



Parameter $is_username

Expected type: Boolean
Description: Whether or not the first parameter is the username. If false or not specfied, the first parameter should be the member ID.



Return value

Expected type: Boolean
Description: True if they entered the correct password, false otherwise


Notes

  • All parameters are technically optional, but the function won't do much if either of the first two parameters are missing:
  • If no ID is specified, the function doesn't do anything.
  • If no password is specified, the function will return false (obviously)
  • If is_username isn't specified, it is assumed that the first parameter is the user ID and not the username.
View all versions of this function