diff --git a/plugins/wordpress-mu-plugin-fasauth/fasauth.php b/plugins/wordpress-mu-plugin-fasauth/fasauth.php new file mode 100644 index 0000000..36683d9 --- /dev/null +++ b/plugins/wordpress-mu-plugin-fasauth/fasauth.php @@ -0,0 +1,260 @@ + +
".get_option('fas_error_msg')."
"; +} + +function fas_errors() { + global $error; + global $fas_error; + if ($fas_error == "notindb") + return "ERROR: Username not found."; + else if ($fas_error == "wrongrole") + return "ERROR: You don't have permissions to log in."; + else if ($fas_error == "wrongpw") + return "ERROR: Invalid password."; + else + return $error; +} + +add_action('admin_init', 'fas_auth_init' ); +add_action('admin_menu', 'fas_auth_add_menu'); +add_action('wp_authenticate', 'fas_auth_check_login', 1, 2 ); +add_action('login_form','fas_auth_warning'); +add_action('lost_password', 'disable_function'); +add_action('retrieve_password', 'disable_function'); +add_action('password_reset', 'disable_function'); +add_filter('login_errors','fas_errors'); + + +register_activation_hook( __FILE__, 'fas_auth_activate' );