*/
function pam_auth_userpass($credentials = NULL) {
- if (!is_array($credentials) && (!$credentials['username']) && (!$credentials['password'])) {
+ if (!is_array($credentials) || !isset($credentials['username']) || !isset($credentials['password'])) {
return false;
}
}
$user_pam = new ElggPAM('user');
- $user_auth_result = $user_pam->authenticate();
+ $user_auth_result = $user_pam->authenticate(array());
// check if user authentication is required
if ($API_METHODS[$method]["require_user_auth"] == true) {
*/
function uservalidationbyemail_check_auth_attempt($credentials) {
+ if (!isset($credentials['username'])) {
+ return;
+ }
+
$username = $credentials['username'];
- $password = $credentials['password'];
// See if the user exists and isn't validated
$access_status = access_get_show_hidden_status();