No announcement yet.

[Release vb2.0] Send random password instead of activation code

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Release vb2.0] Send random password instead of activation code

    This is something I've wanted to do for a long time, and since someone mentioned it in the Suggestions forum, I figured I'd write the hack

    Purpose: When a new user regsiters, he is e-mailed a password generated randomly. He will not be able to log in until he receives this e-mail and uses that password. (the same happens if an existing user changes his e-mail address).

    After installing this hack, you will have three options essentially:

    1) Don't verify the e-mail is valid.
    In this case the user selects his own password and nothing is sent to him.

    2) Verify the e-mail is valid by sending an activation code
    This is how vBulletin works now: a user selects his own password during registration, and the BB Mailer sends him an activation code / link that he needs to use before he's able to post

    3) Verify the e-mail is valid by sending a random password
    In this case the user DOES NOT select a password but instead he receives a randomly generated password by e-mail. He will not be able to log in / post until he receives and uses this password.

    The installation includes:

    1) Running a script that updates your database (adds an option "Send New Users Random Password?" with default "NO" -- to preserve your currect state).

    2) Editing three scripts (register.php, member.php, admin/functions.php)

    3) Editing two templates (registeradult, registercoppa) and adding three new templates (small ones).

    If you have questions, I'm here


    Last edited by bira; Fri 4 May '01, 7:48pm.

  • #2
    A couple of images to help out understand what this hack does:



    • #3
      Thats great, I will try it today.
      one question, if the user change his email, will your hack send new password?


      • #4
        yes, Essam, if the user changes his e-mail, it will automatically generate his a new password, e-mail it to him and log him out so he won't be able to log in until he uses this new password.


        • #5
          If people want to test it, they can test this on my test board at

          *** DISCLAIMER TO JELSOFT: this is NOT a production bb but rather a test board that I've set up for Ed Sullivan. Please don't sanction me for using it (no one posts on it or anything.)


          • #6
            thank you bira
            You're my Prince of Peace
            And I will live my life for You


            • #7
              thank you bira

              good hack


              • #8
                it would be great to include this to 2.0


                • #9

                  where can i change this sentence?

                  Here are your login details for the bulletin board at http:// .

                  Username = bokhalifa
                  Password = +

                  Don't forget that they are case sensitive!

                  To edit your profile, go to this page:

                  dar bokhalifa team




                  • #10
                    question, what will happen to the ppl who havn't activated themsevles? of course I mean the ones who registered before installing this hack.


                    • #11
                      Essam, they can still activate themselves. That system did not get impaired in any way.

                      bokhalifa, this is the template email_lostpw -- it's the same template that people get when they lost their password and request for it.
                      Last edited by bira; Sat 5 May '01, 11:38am.


                      • #12
                        Is there a way to send all the unactivated members a new password? instead of still requiring them to activate themselves.


                        • #13
                          Essam, go to the Control Panel -> Usergroups. Click in 'list users' next to Users Awaiting Email Confirmation. For each user you can:

                          1) change his usergroup to 'registered'
                          2) click on 'send password'

                          If you have more than a dozen or so, let me know and I'll write you a quick script to run to do that in a batch.


                          • #14

                            thank you bira

                            good hack min


                            • #15
                              More than a dozen?!
                              I have 1319 member awaitning confirmation

                              I would really appreciated if you write me that hack. The hack will send a random password right?
                              Cause for the normal password this can be done from "Email Users".
                              Last edited by Essam; Sat 5 May '01, 12:59pm.


                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.