← All changes
|
application/modules/wordpress/models/wordpress_user_model.php
+0
-26
2.2.1
→
2.1.2
View file →
| @@ -28,9 +28,8 @@ | ||
| 28 | 28 | $wp_role = ( $wuser->roles && is_array($wuser->roles) && isset($wuser->roles[0]) ) ? $wuser->roles[0] : ''; |
| 29 | 29 | |
| 30 | 30 | $k = 'wordpress_' . 'role_' . $wp_role; |
| 31 | 31 | $user_level = $CI->app_conf->get( $k ); |
| 32 | - | |
| 33 | 32 | if( ! $user_level ) |
| 34 | 33 | return; |
| 35 | 34 | |
| 36 | 35 | $user->level = $user_level; |
| @@ -44,33 +43,8 @@ | ||
| 44 | 43 | } |
| 45 | 44 | else |
| 46 | 45 | { |
| 47 | 46 | $user->first_name = $wuser->display_name; |
| 48 | - } | |
| 49 | - | |
| 50 | - if( $wuser->user_email ) | |
| 51 | - { | |
| 52 | - if( $is_new OR ($wuser->user_email != $user->email) ) | |
| 53 | - { | |
| 54 | - // check if this email already exists | |
| 55 | - $um = new User_Model; | |
| 56 | - $um->where( 'email', $wuser->user_email )->get(); | |
| 57 | - if( $um->exists() ) | |
| 58 | - { | |
| 59 | - if( $is_new ) | |
| 60 | - { | |
| 61 | - // update id in our table | |
| 62 | - $um->where('id', $um->id)->update('id', $id); | |
| 63 | - $user->id = $id; | |
| 64 | - } | |
| 65 | - else | |
| 66 | - { | |
| 67 | - $user->id = $um->id; | |
| 68 | - } | |
| 69 | - $is_new = FALSE; | |
| 70 | - } | |
| 71 | - $user->email = $wuser->user_email; | |
| 72 | - } | |
| 73 | 47 | } |
| 74 | 48 | |
| 75 | 49 | if( |
| 76 | 50 | ( $is_new && $user->save_as_new() ) |