Finds out if a set of login credentials are valid, and if requested,
mark the user as logged in in the current session.
public authenticate ( string $userId, array $credentials, boolean $login = true ) : boolean | ||
$userId | string | The userId to check. |
$credentials | array | The credentials to check. |
$login | boolean | Whether to log the user in. If false, we'll only test the credentials and won't modify the current session. Defaults to true. |
return | boolean | Whether or not the credentials are valid. |