Announcement

Collapse
No announcement yet.

Moderate new members and email verification

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Just as an FYI - echoing $bbuserinfo will always show your info, no matter where on the board you are.

    Now to your question:
    Better, if it's the number of posts that user made - as I can guess -, what's its meaning here and what reasons it could be > 0 ?
    That action is also used if a member is reverifying their email address after changing it. So it checks to see if posts > 0. If yes, then the user is already an active member that is just changing their email address and should not be put in the COPPA/moderation group. If no, then the user is *not* an active member and should be put in the COPPA group.

    Now, why this is not working is another issue.

    Comment


    • #17
      > echoing $bbuserinfo will always show your info

      Of course. But if 'me' is the new user - without cookies - accessing the page register.php?action=act, that number SHOULD BE ZERO (not?), and this verified condition should lead the user in the first branch of the if sentence, to the group 4...

      At least, it's the solution, I think.

      I'll try as soon as I can reopen the board to new subscription to make this test.
      What do you think about ?
      Thnx

      Comment


      • #18
        What you said is how it should work...but I'm confused - is it not working?

        Comment


        • #19
          Yep!
          Sorry but could check just now.

          Yes! With the cookies off, it makes what should do.... :
          the user in group 3 is moved first in group 4 when he answers the email, later in group 2 when the admin validates him from the AdminCP.

          Ok. That's right. Thanks a lot and sorry for messing your time.
          Hopefully will be useful to somebody.
          Bye

          Comment


          • #20
            Well. After THE FIRST DAY of correct job of the above solution, I'm back with a new problem or bug ??

            When the user is moved from group 3 to 4 and later to 2, HIS TITLE DOESN'T CHANGE; actually the custom title flag is set to NO, but however the title (status) displayed near the username, is always 'user awaiting email confirmation', i.e. of group 3 ....
            Even the users has passed thorugh group 4 and group 2, where the title SHOULD BE 'Member' and custom title flag set to 'no'....



            Should I modify something by now ?
            Thanks

            Comment


            • #21
              Sorry, tubedogg. Could you evaluate if my urgent problem ?

              I know well I made you messing time with a cookie mistake
              , but as you could see I have worked a lot... about.

              Well, just about the users changing usergroupid in register.php, I found the above problem, better explained here :
              http://www.vbulletin.com/forum/showt...threadid=35311
              (which still has only FOUR views !!! )

              Could I enforce somewhere in register.php updating the usergroup title of a changin-group-user ? Is it a bug ?

              Thank you very very much.
              Bye


              Note: this is URGENT because I'm trying to educate our users to this new login flow, and can't obtain a clean behavior if the different flow-states aren't suddendly updated to the users' view ! <grin>
              Last edited by Jet; Fri 14 Dec '01, 6:05am.

              Comment


              • #22
                Wow!!!
                Four mine on four posts!!!
                It should be better than a 4-table one-on-one relationships in a DB !! :LOL:

                Well. I tried to solve myself the problem with a modification to code.
                Hack, bugfix or the worst solution ever !!! Call it as you prefer....

                As I'm a dummy php coder, could you or other expert people validate it and tell if addresses right the problem without side effects ?

                Simply, changed the lines:
                PHP Code:
                    if ($userinfo[coppauser] or ($moderatenewmembers and !$bbuserinfo['posts'])) {

                            
                // put user in moderated group
                            
                $DB_site->query("UPDATE user SET usergroupid=4 WHERE userid='$u'");

                            eval(
                "standarderror(\"".gettemplate("error_moderateuser")."\");");
                        } else {
                            
                // activate account
                            
                $DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");

                            
                $username=$userinfo[username];
                            eval(
                "standarderror(\"".gettemplate("error_activatedthanks")."\");");
                        } 
                with:
                PHP Code:
                    if ($userinfo[coppauser] or ($moderatenewmembers and !$bbuserinfo['posts'])) {

                            
                // put user in moderated group
                            
                $nextugid=4;
                            
                $nextugrp=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid='$nextugid'");
                            
                $DB_site->query("UPDATE user SET usergroupid='$nextugid', usertitle='$nextugrp[usertitle]' WHERE userid='$u'");

                            eval(
                "standarderror(\"".gettemplate("error_moderateuser")."\");");
                        } else {
                            
                // activate account
                            
                $nextugid=2;
                            
                $nextugrp=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid='$nextugid'");
                            
                $DB_site->query("UPDATE user SET usergroupid='$nextugid', usertitle='$nextugrp[usertitle]' WHERE userid='$u'");

                            
                $username=$userinfo[username];
                            eval(
                "standarderror(\"".gettemplate("error_activatedthanks")."\");");
                        } 
                Should it work ?
                Last edited by Jet; Fri 14 Dec '01, 9:24am.

                Comment


                • #23
                  Not at all... Something's still missing about group 4 -> group 2 update... I'll work better...

                  Nobody could check my issue ?

                  Thnx

                  Comment


                  • #24
                    6-on-6 !!! Am I alone, here ???

                    Well, the (final) bugfix / workaround should be here !
                    Thanks.

                    Comment


                    • #25
                      Sorry, my hard drive crashed.

                      Anyway that code should work fine.

                      Comment


                      • #26
                        NP. Thanks a lot for your answer...

                        Best wishes for Christmas and your recovery !

                        P.S.: there's only a little bug about 'usertitle's in Registered users (grp 2) because I should apply the two or three lines of code for 'Members' and number of posts...
                        I'll do better.
                        Thnx

                        Comment


                        • #27
                          np and thanks

                          Comment

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