diff --git a/plugins/wordpress-mu-plugin-fasauth/fasauth.php b/plugins/wordpress-mu-plugin-fasauth/fasauth.php
index ba108c5..0139553 100644
--- a/plugins/wordpress-mu-plugin-fasauth/fasauth.php
+++ b/plugins/wordpress-mu-plugin-fasauth/fasauth.php
@@ -57,7 +57,7 @@ if (!function_exists('wp_authenticate')) {
// check minimum requirements
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', __('Error: 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', __('Error: 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);
}
// 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);
} 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', __('Error: FAS login unsuccessful.'));
}
}
diff --git a/scripts/Auth_FAS_MediaWiki/Auth_FAS.php b/scripts/Auth_FAS_MediaWiki/Auth_FAS.php
index eb6881a..e429f5c 100644
--- a/scripts/Auth_FAS_MediaWiki/Auth_FAS.php
+++ b/scripts/Auth_FAS_MediaWiki/Auth_FAS.php
@@ -28,7 +28,7 @@ class Auth_FAS extends AuthPlugin {
curl_close ($ch);
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;
}
@@ -36,11 +36,11 @@ class Auth_FAS extends AuthPlugin {
for ($i = 0, $cnt = count($groups); $i < $cnt; $i++) {
if ($groups[$i]["name"] == "cla_done") {
- fwrite(STDERR, "FAS auth succeeded for $username\n");
+ error_log("FAS auth succeeded for $username", 0);
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;
}