Home Forums Plugin Support WP User Frontend Pro Update profile email problem

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  towhid 4 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33157

    Tao
    Member
    Post count: 1

    hi,

    When a user updates EMAIL with fronted Registration Form like[wpuf_profile type=”profile” id=โ€œxxโ€], new addresses are always updated, even the new address is already occupied.

    The problem is the same address will be registered to different users.

    How to solve this?

    thanks

    #33167

    towhid
    Participant
    Post count: 4505

    Hello Tao,

    Would you please let me clear, are you trying to register new user or update an existing user? Also please elaborate your question in more details.

    Thank You ๐Ÿ™‚

    #33240

    Tao
    Member
    Post count: 1

    Hi,

    Here is my Registration Form.

    Short-code [wpuf_profile type="registration" id="7"] for register a new user.
    Short-code [wpuf_profile type="profile" id="7"] for an existing user update profile, include email field.

    An existing user A update his email from a@a.com to b@b.com, new addresses are always updated, even the new address is already used by user B. Now user A and user B have the same email address.

    The problem is when user A and user B login WP with email.

    Sorry for my bad english, and hope you can understand the problem.

    happy new year.

    Tao

    #33251

    towhid
    Participant
    Post count: 4505

    Hello Tao,

    I have tested your issue and found the problem. I have to discuss with our developer team about this. Hope they will help me to fix this. Please allow me some time.

    Thank You ๐Ÿ™‚

    #33574

    towhid
    Participant
    Post count: 4505

    Please open class/frontend-form-profile.php and find

    if ( $this->search( $user_vars, 'name', 'description' ) ) {
         $userdata['description'] = $_POST['description'];
    }

    after that code block paste this below code

    if ( $userinfo->user_email != trim( $_POST['user_email'] ) ) {
        if( email_exists( trim( $_POST['user_email'] ) ) ) {
            $this->send_error( __( 'That E-mail is already exists', 'wpuf' ) );
        }
    }

    Please let me know that this solution works for you or not.

    Thank You ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Update profile email problem’ is closed to new replies.