This topic has 8 replies, 4 voices, and was last updated 11 years by SQadmin.

  • Author
  • #2392
     Harvinder
    Participant

    Hi,

    I would like to add the avatar part to the sign up page, so users have to upload an image for there avatar upon registration, also would like to make this a required action?

    Thanks in Advance
    Harvinder

    #2425
     SQadmin
    Keymaster

    That is currently not possible and also not a good option to let everybody upload files on your server

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2579
     Harvinder
    Participant

    Ok. You said

    “That is currently not possible and also not a good option to let everybody upload files on your server”

    What about when users upload files using rtMedia etc, dont they upload to my server?

    #2585
     SQadmin
    Keymaster

    I wanted to say that also not logged in users will be able to upload. rtMedia allows only if you are a member

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2715
     RonP
    Participant

    Ok that said, can during the user registration, can the user be re-directed after comfirmation to avatar upload automatically ?

    #2744
     SQadmin
    Keymaster

    You can redirect users at the first login to avatar page by adding this code to sweetdate-child/functions.php

    COPY CODE
    
    function function_new_user($user_id) { 
       add_user_meta( $user_id, '_new_user', '1' );
    }
    add_action( 'user_register', 'function_new_user');
    
    //The next function will check if it's the first login and redirect the user.
    
    function function_check_login_redirect($user_login, $user) {
       $logincontrol = get_user_meta($user->ID, '_new_user', 'TRUE');
       if ( $logincontrol ) {
          //set the user to old
          update_user_meta( $user->ID, '_new_user', '0' );
    
          //Do the redirects or whatever you need to do for the first login
          wp_redirect( home_url().'/members/'.$user_login.'/profile/change-avatar/#item-nav', 302 ); exit;
       }
    }
    add_action('wp_login', 'function_check_login_redirect', 10, 2);
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2769
     RonP
    Participant

    Thank you

    #2777
     aero77
    Participant

    sweetdate child functions file ?

    #2802
     SQadmin
    Keymaster

    Yes indeed.Thanks. I have changed it

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?