Custom Fields
Re-Envisioned
Support MB User Profile Registration: username as email, duplicated fields, avatar, visibility issue

  • Creator
    Topic
  • #15365
    Resolved Mauro
    Participant

    Hello!
    In the registration form that gets created through the shortcode

    [mb_user_profile_register id="meta-box-id" label_submit="Register" confirmation="Your account has been created successfully."]

    I have the following issues:

    1. I want to use the e-mail address as username, and not allow the user to pick a username.
    2. I have a default-fields group that lists first name, last name and email address and this way the email address field is duplicated in the top section and in the following section of the form.
    3. I have a custom avatar and it’s setup as a “single image” but I do not want the user to access the media manager. This should behave like the “image” field but with “multiple” attribute set to false.
    4. Once I’m logged in and I access the registration page, I see the form. I should see a message like in the login form: “you are already logged in”.

    Thanks!
    Mauro.

Viewing 4 replies - 11 through 14 (of 14 total)
  • Author
    Replies
  • #18239
    Anh Tran
    Keymaster

    We’re working on this. We’ve just finished that for the Frontend Submission extension and will do for User Profile next.

    #18437
    mdiessner
    Participant

    Hi Anh,
    Can you pls advise when this is implemented? I have the AIO plugin. Thanks, Martin

    #19199
    Content Pilot
    Participant

    This is what broke my website.

    #4 from Mauro’s original post. Hide the form if a user is already logged in. Seems logical.

    I was using this user registration form so that admins could register authors. Meaning that an admin is logged in, as their admin account, then they browse to a frontend form to register a new user. I have this form setup with a post type creation form as a workflow for creating users attached as authors to a single post type object.

    All I need is for the registration form to be exposed even if the user is logged in.

    #21465
    Johannes Gross
    Participant

    I was able to display the first_name and last_name field above the email address by using the following code:

     function add_more_registration_fields($fields) {
            $new_fields = [
                'first_name'  => [
                    'name'     => 'First Name',
                    'id'       => 'first_name',
                    'type'     => 'text',
                    'required' => 1
                ],
                'last_name'  => [
                    'name'     => 'Last Name',
                    'id'       => 'last_name',
                    'type'     => 'text',
                    'required' => 1
                ],
            ];
            $fields = array_merge( $new_fields, $fields );
            return $fields;
        }
    add_filter( 'rwmb_profile_register_fields',  'add_more_registration_fields'));
Viewing 4 replies - 11 through 14 (of 14 total)
  • You must be logged in to reply to this topic.