Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • in reply to: edit profile #10084
    ingegnimultimedialiingegnimultimediali
    Participant

    Email field is empty.
    but if I want only to edit a single meta box field, why I must insert my password?

    https://www.dropbox.com/s/nfvw9ykq5an1jv1/edit.png

    If I insert an email that was already used by other user, no error message was displayed or returned

    in reply to: edit profile #10062
    ingegnimultimedialiingegnimultimediali
    Participant

    no, in edit form all fields of meta box are filled, but email and password are empty

    in reply to: required fields #9962
    ingegnimultimedialiingegnimultimediali
    Participant

    I solved by using user_register action

    add_action( 'user_register', 'test');

    function test( $user_id ) {

     add_user_meta( $user_id, 'user_field', 'field_value' );
    

    }

    in reply to: required fields #9961
    ingegnimultimedialiingegnimultimediali
    Participant

    I'm sorry for last reply... the 2nd snippet is correct and it works fine

    using rwmb_profile_insert_user_data is it possible to return the

    $this->user_id = wp_insert_user( $data );??

    Know the user_id value will allow to do many other things

    in reply to: edit profile #9960
    ingegnimultimedialiingegnimultimediali
    Participant

    #2 the correct attribute is user_id

    however the meta box is correctly populate, but email and passwords fields are empty.
    If I insert new values for email and password in these empty fields the values are not saved

    in reply to: required fields #9959
    ingegnimultimedialiingegnimultimediali
    Participant

    whit the 2nd snippet the user_email value is not saved in user account

    in reply to: required fields #9886
    ingegnimultimedialiingegnimultimediali
    Participant

    Hi Anh,
    now it's works.

    Another question:
    if I would to customize only username e password, but insert user_email field in form, I use

    add_filter( 'rwmb_profile_register_fields', 'addfield', 10, 1);
    function addfield($fields){
        $fields = array(
                array(
                    'type' => 'email',
                    'name' => 'Email',
                    'id'   => 'user_email',
                    'required' => 1
                ));
    return $fields;
    }

    to display user_email with my form

    This hook works but not save user_email value in user account

    I've used this rwmb_profile_insert_user_data

    add_filter( 'rwmb_profile_insert_user_data', function ( $data, $config ) {
        // User strpos because the $config also contains default register form.
        if ( false === strpos( $config['id'], 'user-account' ) ) {
            return $data;
        }
        // Custom data for user.
        $data = [
            'user_login' => 'my_user3',
            'user_pass'  => 'my_user_pass',
        ];
        return $data;
    }, 10, 2 );
    in reply to: required fields #9843
    ingegnimultimedialiingegnimultimediali
    Participant

    Hi anh,
    the update action to 1.0.2 fail...

    and the #2 error remaining...

    Fatal error: Uncaught Error: Call to undefined function info() in /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/class-mb-user-profile-user.php:105 Stack trace: #0 /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/class-mb-user-profile-user.php(57): MB_User_Profile_User->create() #1 /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/forms/class-mb-user-profile-form.php(110): MB_User_Profile_User->save() #2 /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/shortcodes/class-mb-user-profile-shortcode-register.php(43): MB_User_Profile_Form->process() #3 /home/xxxxxxxx/wp-includes/class-wp-hook.php(286): MB_User_Profile_Shortcode_Register->process('') #4 /home/xxxxxxxx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #5 /home/xxxxxxxx/website/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #6 /home/xxxxxxxx/wp-includes/template-loader.php(12): do in /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/class-mb-user-profile-user.php on line 105

    in reply to: required fields #9816
    ingegnimultimedialiingegnimultimediali
    Participant

    Thanks for update, but...

    1. always show error notify "Your username already exists."

    2. after submit form --> Fatal error: Uncaught Error: Call to undefined function info() in /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/class-mb-user-profile-user.php:105 Stack trace: #0 /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/class-mb-user-profile-user.php(57): MB_User_Profile_User->create() #1 /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/forms/class-mb-user-profile-form.php(110): MB_User_Profile_User->save() #2 /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/shortcodes/class-mb-user-profile-shortcode-register.php(43): MB_User_Profile_Form->process() #3 /home/xxxxxxxx/wp-includes/class-wp-hook.php(286): MB_User_Profile_Shortcode_Register->process('') #4 /home/xxxxxxxx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #5 /home/xxxxxxxx/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #6 /home/xxxxxxxx/wp-includes/template-loader.php(12): do in /home/xxxxxxxx/wp-content/plugins/mb-user-profile/inc/class-mb-user-profile-user.php on line 105

    in reply to: required fields #9765
    ingegnimultimedialiingegnimultimediali
    Participant

    Hi Anh,
    any updates?
    I'm thinking about a solution with rwmb_profile_insert_user_data
    If I hidden required fields in the form, is it possible to set custom value by user data filter?
    what do you think about it?

    in reply to: Custom table save error #9577
    ingegnimultimedialiingegnimultimediali
    Participant

    Hi,
    It seems that the problem was resolved
    thanks

    in reply to: Custom table save error #9550
    ingegnimultimedialiingegnimultimediali
    Participant

    Hi,
    I've replicate all on a pilvia installation.

    https://mbtest.demo.site/wp-admin/
    user: mbtest-admin
    pass: demopass

    https://app.pilvia.com/yourphpmyadmin/copper/sql.php?server=1&db=mbtest&table=wp_customtable&pos=0
    user: mbtest
    pass:h6YeC7yceywcgUE

    Scenario:

    CPT test #1 -> Test CPT test #1 (metabox with custom table wp_customtable)
    when I save CPT also wp_customtable was populate

    CPT test #2 -> no metabox
    when I save CPT nothing happened on wp_customtable

    standard posts -> (ONLY ONE METABOX) "new meta box for posts" (metabox for standard post)
    when I save new post also wp_customtable was populate with an empty row (only postId and AI)

    Pages -> two classic metabox
    when I save a new page nothing happened on wp_customtable

    in reply to: Custom table save error #9538
    ingegnimultimedialiingegnimultimediali
    Participant

    Hi,
    I’ve do several test.
    when I have a cpt with metabox with custom table I’ve seen this behavior:
    If I have other cpt without metabox there’s nothing happened when it is Saved.
    But if another cpt has only one metabox, the custom table was populate with an empty row.
    when I have more metabox for other cpt nothing happened when it is saved.
    Is there some bug?

    in reply to: Custom table save error #9490
    ingegnimultimedialiingegnimultimediali
    Participant

    The metabox for custom table is correctly set and view only on order post

    in reply to: post_id in hook rwmb_frontend_after_process is missing #9272
    ingegnimultimedialiingegnimultimediali
    Participant

    Now it works fine!
    Thnks

Viewing 15 posts - 1 through 15 (of 18 total)