Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hook into First Login of User

  • Avatar of Roland Fauster
    Roland Fauster
    Participant

    @rfauster

    Hi

    I am trying to hook into the Users first Login after Activation to have him fill out certain fields out of the XProfile Fields I define.

    I dont want to push some mandatory extra fields in front of the user but would like to have a set filled out by them.

    My “Dream” Scenario would be to get him to sign up with the bare minimum and then have him activate the account. immediately after activation the user receives a page (in form of a Jquery overlay) where the user logs in and then fills out a set of 3-5 more fields.

    Is there a Hook in Buddypress that lets me grab the user at that state and call some custom functions?

Viewing 1 replies (of 1 total)
  • Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    I’d like to know this as well. You could probably put this on activate.php somehow.

    Also the standard WPMU welcome email is sent on first login. That works via a function in wpmu-functions.php:

    function wpmu_welcome_user_notification($user_id, $password, $meta = '') {
    global $current_site;
    ...

    wp_mail($user->user_email, $subject, $message, $message_headers);
    return true;
    }

    I don’t see a hook in that function. It’s called/triggered from function wpmu_activate_signup in the same php file.

    wpmu_activate_signup is called from function bp_core_screen_activation in bp-core-activation.php.

    Perhaps you could add a redirect there to the mandatory extra fields? There are already some if statements there, one with this:

    bp_core_redirect( $bp->root_domain . '/' . BP_ACTIVATION_SLUG );

    You could add your own? Just guessing, wouldn’t know what it would look like…

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.