mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Add option to allow primary email editable in profile view
This commit is contained in:
@@ -358,7 +358,9 @@
|
||||
|
||||
if ( $args[$key] == '' && in_array( $key, array('user_email') ) ) {
|
||||
$ultimatemember->form->add_error($key, __('You must provide your email','ultimatemember') );
|
||||
} else if ( $mode == 'register' && email_exists( $args[$key] ) ) {
|
||||
} else if ( in_array( $mode, array('register') ) && email_exists( $args[$key] ) ) {
|
||||
$ultimatemember->form->add_error($key, __('This email is already linked to an existing account','ultimatemember') );
|
||||
} else if ( in_array( $mode, array('profile') ) && email_exists( $args[$key] ) != $args['user_id'] ) {
|
||||
$ultimatemember->form->add_error($key, __('This email is already linked to an existing account','ultimatemember') );
|
||||
} else if ( !is_email( $args[$key] ) ) {
|
||||
$ultimatemember->form->add_error($key, __('This is not a valid email','ultimatemember') );
|
||||
|
||||
Reference in New Issue
Block a user