Skip to:

how to shorten Buddypress activation key

  • yahya92


    Hello there,
    I wanted to make my users able to register through their phone number without having to type their email too, after long thinking I had this idea.
    I changed the email input type to text and tested if the typed in text is an email so the user is registering through email, else if it is phone number then add to it, I also got the activation key from datbase and sent it to users by sms.
    my problem is that the sent activation key is too long to be typed, I tried to alter the activation key in database when user is registering but when the user enters the updated activation key, the activation page is just refreshed and the code field is emptied.
    any ideas? I want to make the activation key just 6 characters long

Viewing 7 replies - 1 through 7 (of 7 total)
  • Ah, interesting idea.

    When you alter the activation key in the database, where exactly are you changing it? User meta? wp_signups table? Both? (It depends if you are using multisite or not).

    (I assume you are using functions to change the values rather than direct SQL — if you’re doing the latter, you’ll need to clear some caches).



    actually I changed it only in wp-signups. no, not using multisite
    I am editing register.php in my child theme

    I think you’ll need to change it in both places. I have no idea why we store it twice, but I’m blaming @imath since he introduced the signups table. 🙂



    Like a charm!
    thanks (y)



    as you mentioned, what is the benefit of signups table ? can I clear it every week to make the names of unactivated users available to be used again?

    Multisite uses the signups table to hold user accounts that have registered but not activated their accounts yet. BuddyPress, of course, does this same thing by default, so it makes sense for us to use this same table.



    @djpaul that was to avoid breaking plugins playing with the user meta for regular WordPress install (non multisite).

    You can skip it by using:
    define( 'BP_SIGNUPS_SKIP_USER_CREATION', true );

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