• RL86

    (@rlijkendijk86)


    Hi!

    First of all great work on this plugin :-).

    I was wondering if it is possible to add an “Upload profile image” field to the registration form. A lot of users don’t seem to upload an profile image after creating an account, and I find the default “no profile image icons” kinda boring ;-).
    I hope more users will upload an image when it is part of the registration process.

    I know you can add an upload image field to the registration form, but what data should I enter so the system knows the upload image should be the profile image?

    Thanks for helping me out!

Viewing 13 replies - 16 through 28 (of 28 total)
  • Worked like a charm, thank you guys.

    @romankacerek

    Thanks, but how do you allow them upload a cover photo on registration too? do we need a similar snippet in the functions file?

    Anyone else have done the same? got it working for profile photo, no problem there.

    thank YOU Romankac!!! your code worked like a charm; i am SO happy:-)

    YUK; Romankac your code worked fine the first time, for an Author.
    Now it only works for Administrator. When Authors click the COG wheel, they have 2 options only: Edit profile and cancel. If they click on Edit profile, they get a page saying: “you are already registered” ????

    I’ve done everything i can to see what’s interfering; eg, made sure the uploads folder has the correct permissions (755); i can’t find anywhere else what might be getting in the way.

    Help anybody?
    thanks

    @pfsoto Try modifying folder and subfolder permissions to chmod 777 please. Clear the browser cache and try registration on a new anonymous window (CTRL+SHIFT+n for Chrome).

    Thanks for the reply Romankac; this is driving me round the bend. ??

    I will try setting UPLOAD (right?) folder permission to 777. Which other subfolders?

    I have cleared cache to no avail; i will try your suggestion re anonymous window; HOWEVER 1) i use Firefox and more importantly, 2) one of my members (an author) hasn’t been able complete the upload from the get-go.

    I can do it as an admin; I can’t do it with a test author i set up.
    sigh, sigh sigh.
    Thanks for being there!!

    None of this is helping, sadly. I can’t upload on this PC, my other PC, my Iphone or my Ipad. It has something to do i’m sure with permissions, but no setting i can find will work. I can only upload with your code as an admin. With author role i always get “you are already registered”. sigh, sigh, sigh

    FWIW, i am using Ultimate Member with the Appeal theme should that shed any light.

    • This reply was modified 6 years, 6 months ago by pfsoto.

    @pfsoto

    1) Are you using any plugins, such as the Admin Menu Editor or something that could affect the permissions?

    2) Try disable all plugins that might conflict with the Ultimate member and affect the permissions settings.

    3) Is really not the user already registered? Have you tried another registration e-mail or have a look at the users?

    4) What about UM > Settings > Uploads? I have a set limit, but it probably will not affect – https://imgur.com/a/41zPU9E

    5) If nothing helps, I can look myself. In this case, please send me the login information with the administrator rights to the e-mail [email protected]

    @niko87

    I’m not sure but you can try to change “profile_photo” to “um-cover” key in: /wp-content/themes/your-theme-name/function.php

    add_filter('um_user_pre_updating_files_array','um_custom_user_pre_updating_files_array', 10, 1);
    function um_custom_user_pre_updating_files_array( $arr_files ){
    
    if( is_array( $arr_files ) ){
    foreach( $arr_files as $key => $details ){
    if( $key == 'usercover' ){
    unset( $arr_files[ $key ] );
    $arr_files[ 'um-cover' ] = $details;
    }
    }
    }
    
    return $arr_files;
    }
    
    add_filter('um_allow_frontend_image_uploads','um_custom_allow_frontend_image_uploads',10, 3);
    function um_custom_allow_frontend_image_uploads( $allowed, $user_id, $key ){
    
    if( $key == 'um-cover' ){
    return true;
    }
    
    return $allowed; // false
    }

    Also you must set up Meta Key in registration form to “usercover” (without quotes).

    @niko87 Or maybe try profile_cover instead um-cover

    Yes, Romankac; i have quite a few plugins; i was trying to remember what i installed perhaps just before having difficulty.
    Last night all of a sudden, the upload didn’t work for admin either; and i don’t think i changed anything significant. I lost my own avatar/profile pic in in the bar at top of screen. not in my profile tho.

    i will do what you said re removing plugins.
    If i can’t resolve this, i’d be willing to pay you to fix it.
    My only concern re doing this: i’ve created this website for fellow tenants in my building (low income) and don’t know how much interest there will be. (But i don’t mind since i may use what i learn for some other project.)

    fwiw:
    These are my plugins; stars ** indicate ones i may have installed after the upload was working; i’ll start deactiving those:

    Adminimize
    Akismet anti-spam
    Easy Google Fonts
    Google Analytics
    iFlyChat
    Jetpack
    Jetpack Only for Admins
    **Loginizer
    MOJO Marketplace
    ** Page Builder (i let this be updated; don’t think i’m even using it)
    Peter’s Login Redirect
    **Restrict Media Library Access
    **Shield
    Simple Local Avatars (i’ve deactivated and deleted over and over)
    Ultimate Member
    Ultimate Member Terms and Conditions
    **Webcraftic Clearfly
    WP User Avatar (same as Simple Local; activated, deactived multiple times)
    WPForms Lite

    A few others are deactivated

    off to read your othr emails

    THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!

    Am also working on your 2nd suggestion…re php code

    FWIW: the website is https://243broadway.com

    i also can not for the life of me figure out why 3 of my Ultimate Member registration fields are prefilled for new visitors. YUK

    https://243broadway.com

    peculiar: i haven’t done a darn thing today and several little things are not as i left the site last night. 1 example: the Login link on menu bar for new visitors: i set that to only show for approved members; TWICE; it’s come back again. ??

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘Registration form customization: Upload profile image’ is closed to new replies.