Try using error_log instead.
This commit is contained in:
parent
6cc0853dd4
commit
c42a697d01
2 changed files with 7 additions and 7 deletions
|
@ -57,7 +57,7 @@ if (!function_exists('wp_authenticate')) {
|
||||||
|
|
||||||
// check minimum requirements
|
// check minimum requirements
|
||||||
if (check_login_requirement($fasuserdata) !== true) {
|
if (check_login_requirement($fasuserdata) !== true) {
|
||||||
fwrite(STDERR, "FAS auth failed for $username: insufficient group membership\n");
|
error_log("FAS auth failed for $username: insufficient group membership", 0);
|
||||||
return new WP_Error('fasauth_min_requirement', __('<strong>Error</strong>: You do not meet minimum requirements to login.'));
|
return new WP_Error('fasauth_min_requirement', __('<strong>Error</strong>: You do not meet minimum requirements to login.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,16 +71,16 @@ if (!function_exists('wp_authenticate')) {
|
||||||
return new WP_Error('fasauth_create_wp_user', __('<strong>Error</strong>: Unable to create account. Please contact the webmaster.'));
|
return new WP_Error('fasauth_create_wp_user', __('<strong>Error</strong>: Unable to create account. Please contact the webmaster.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite(STDERR, "FAS auth succeeded for $username\n");
|
error_log("FAS auth succeeded for $username", 0);
|
||||||
return new WP_User($user_id);
|
return new WP_User($user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// all good, let go on
|
// all good, let go on
|
||||||
fwrite(STDERR, "FAS auth succeeded for $username\n");
|
error_log("FAS auth succeeded for $username", 0);
|
||||||
return new WP_User($user->ID);
|
return new WP_User($user->ID);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fwrite(STDERR, "FAS auth failed for $username: incorrect username or password\n");
|
error_log("FAS auth failed for $username: incorrect username or password", 0);
|
||||||
return new WP_Error('fasauth_wrong_credentials', __('<strong>Error</strong>: FAS login unsuccessful.'));
|
return new WP_Error('fasauth_wrong_credentials', __('<strong>Error</strong>: FAS login unsuccessful.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Auth_FAS extends AuthPlugin {
|
||||||
curl_close ($ch);
|
curl_close ($ch);
|
||||||
|
|
||||||
if (!isset($response["success"])) {
|
if (!isset($response["success"])) {
|
||||||
fwrite(STDERR, "FAS auth failed for $username: incorrect username or password\n");
|
error_log("FAS auth failed for $username: incorrect username or password", 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +36,11 @@ class Auth_FAS extends AuthPlugin {
|
||||||
|
|
||||||
for ($i = 0, $cnt = count($groups); $i < $cnt; $i++) {
|
for ($i = 0, $cnt = count($groups); $i < $cnt; $i++) {
|
||||||
if ($groups[$i]["name"] == "cla_done") {
|
if ($groups[$i]["name"] == "cla_done") {
|
||||||
fwrite(STDERR, "FAS auth succeeded for $username\n");
|
error_log("FAS auth succeeded for $username", 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fwrite(STDERR, "FAS auth failed for $username: insufficient group membership\n");
|
error_log("FAS auth failed for $username: insufficient group membership", 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue