Changeset 175 for trunk/wp-content/plugins/xpressme/include
- Timestamp:
- Apr 11, 2009, 1:17:59 PM (16 years ago)
- Location:
- trunk/wp-content/plugins/xpressme/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/pluggable-override.php
r173 r175 38 38 if (check_xpress_auth_cookie()){ //The cookie is login user's or it checks it 39 39 if ( $user = wp_validate_auth_cookie() ) { 40 if (!check_user_meta_prefix($user)){ 41 repair_user_meta_prefix(); 42 } 43 40 44 wp_set_current_user($user); 41 45 return ; -
trunk/wp-content/plugins/xpressme/include/user_sync_xoops.php
r130 r175 143 143 $message .= '...UPDATE ' . $xoops_user->uname . '(Level Not Change)'; 144 144 } 145 if (!check_user_meta_prefix($wp_user_id)){ 146 repair_user_meta_prefix(); 147 } 148 149 $is_update = true; 145 150 }else{ 146 151 $wu_sql = "INSERT INTO $db_xpress_users "; … … 174 179 if ($is_update === false ) { 175 180 update_usermeta( $wp_user_id,'rich_editing',$user_rich_editing); 176 } 181 } 182 177 183 } 178 184 } … … 242 248 * and user_roles option_name pre-fix of the option table of WordPress is not changed. 243 249 */ 250 function check_user_meta_prefix($uid){ 251 global $xoops_db; 252 $db_xpress_usermeta = get_wp_prefix() . 'usermeta'; 253 $user_meta_prefix = get_wp_prefix(); 254 255 $sql = "SELECT * FROM $db_xpress_usermeta WHERE user_id = $uid AND meta_key = '" . $user_meta_prefix ."user_level'" ; 256 257 $user_level = $xoops_db->get_results($sql); 258 if (empty($user_level)) return false ; 259 260 $sql = "SELECT * FROM $db_xpress_usermeta WHERE user_id = $uid AND meta_key = '" . $user_meta_prefix ."capabilities'" ; 261 $capabilities = $xoops_db->get_results($sql); 262 if (empty($capabilities)) return false ; 263 264 return true; 265 } 266 244 267 function repair_user_meta_prefix(){ 245 268 global $xoops_db;
Note: See TracChangeset
for help on using the changeset viewer.