Fix profile update

This commit is contained in:
Champ Camba
2016-11-29 20:31:27 +08:00
parent fab828fcec
commit 7ed3621ffe
+6 -4
View File
@@ -11,11 +11,13 @@
// Sync display name changes
$option = um_get_option('display_name');
$user = get_user_by( 'email', $changes['user_email'] );
$user_id = $ultimatemember->user->id;
um_fetch_user( $user->ID );
$user_id = $user->ID;
if( ! isset( $user_id ) || empty( $user_id ) ){
$user = get_user_by( 'email', $changes['user_email'] );
um_fetch_user( $user->ID );
$user_id = $user->ID;
}
switch ( $option ) {
default: