Changeset 1640
- Timestamp:
- 01/28/2009 02:43:49 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/wpmu-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wpmu-functions.php
r1639 r1640 2085 2085 } 2086 2086 2087 function is_user_spammy( $username = 0 ) { 2088 if( $username == 0 ) { 2089 global $current_user; 2090 $user_id = $current_user->ID; 2091 } else { 2092 $user_id = get_user_id_from_string( $username ); 2093 } 2094 $u = new WP_User( $user_id ); 2095 if( $u->spam == 1 ) 2096 return true; 2097 return false; 2098 } 2099 2100 function login_spam_check( $user, $password ) { 2101 if( is_user_spammy( $user->id ) ) 2102 return new WP_Error('invalid_username', __('<strong>ERROR</strong>: your account has been marked as a spammer.')); 2103 return $user; 2104 } 2105 add_action( 'wp_authenticate_user', 'login_spam_check', 10, 2 ); 2106 2087 2107 // Load WordPress Admin Bar plugin by Viper007Bond. http://www.viper007bond.com/wordpress-plugins/wordpress-admin-bar/ 2088 2108 include( ABSPATH . WPINC . '/wordpress-admin-bar/wordpress-admin-bar.php' );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)