Changeset 722
- Timestamp:
- 02/23/07 23:04:22 (2 years ago)
- Files:
-
- trunk/bb-includes/akismet.php (modified) (3 diffs)
- trunk/bb-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bb-includes/akismet.php
r707 r722 52 52 return; 53 53 $user = bb_get_user( $bb_post->poster_id ); 54 if ( bb_is_trusted_user( $user->ID ) ) 55 return; 54 56 55 57 $_submit = array( … … 72 74 if ( !$user ) 73 75 return; 76 if ( bb_is_trusted_user( $user->ID ) ) 77 return; 74 78 75 79 $_submit = array( … … 85 89 break; 86 90 default : 91 if ( bb_is_trusted_user( bb_get_current_user() ) ) 92 return; 93 87 94 $path = '/1.1/comment-check'; 88 95 trunk/bb-includes/functions.php
r720 r722 1933 1933 } 1934 1934 1935 function bb_is_trusted_user( $user ) { // ID, user_login, BB_User, DB user obj 1936 if ( is_numeric($user) || is_string($user) ) 1937 $user = new BB_User( $user ); 1938 elseif ( is_object($user) && is_a($user, 'BB_User') ); // Intentional 1939 elseif ( is_object($user) && isset($user->ID) && isset($user->user_login) ) // Make sure it's actually a user object 1940 $user = new BB_User( $user->ID ); 1941 else 1942 return; 1943 1944 if ( !$user->ID ) 1945 return; 1946 1947 return apply_filters( 'bb_is_trusted_user', (bool) array_intersect(bb_trusted_roles(), $user->roles), $user->ID ); 1948 } 1949 1935 1950 function bb_get_active_theme_folder() { 1936 1951 $activetheme = bb_get_option( 'bb_active_theme' );