Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activate user in PHP


  • elronaldo
    Participant

    @elronaldo

    It’s insane, but my client wants to suppress the activation email that BuddyPress sends out for activation – she feels that the double-optin that the mass email service sends is ‘enough’ – that was easy enough to do by setting the email to draft mode without touching any code.

    My plugin does an API to hand the just-enrolled (WP user regiatration) email to the mass email service and that’s working fine. The mass email service double-optin email is going out fine to the new email address.

    But after I’ve handed off the email address, I need to move the new user from the Pending page in Users to the main Users page with a wp role/capability of ‘Subscriber’ and a BuddyPres/bbpress capability/role of ‘Participant’ without the client having to go in and activate the user by hand. I’ve been searching WP codex and BuddyPress codex for hints toward an action or filter hook that will do this, but no luck so far. I’ve even gone so far as to try some direct sql mods ti the wp_users and wp_usermeta tables, but no luck, although mods to other items like display_name, etc worked fine.

    I know the dangers of this and have explained them carefully to the client, but she still wants to crash ahead with this. She’ll just have to get the lesson the hard way when her forum fills up with porn. I do plan on implementing this so it’s easily reversible, but she just has to walk thru that dark valley.

    Any help on some code that I can fire from my plugin that will fully activate a user as described above? Thanks for your kind help – no example code here to share because 6-8 methods I tried were all dismal failures.

Viewing 3 replies - 1 through 3 (of 3 total)

  • shanebp
    Moderator

    @shanebp

    If you haven’t already, google this string ‘buddypress auto activate user’.
    It will provide at least some hints.

    Hi, You can skip the email activation step by adding the following filter to one of your php files:

    add_filter( 'bp_registration_needs_activation', '__return_false' );


    uyousaf60
    Participant

    @uyousaf60

    Automatically follow everyone in buddypress. Can Anyone Help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar