We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi All,

    I am using weblogin and need to change the way it works slightly, basicley when someone registeres they are allowed access to the members area of the site, however i want it so that I have to manually allow them access once they register.

    So I need to have the system set them as blocked on registrastion.

    Is this possible without having to install a whole new login system.

    Cheers
      • 20413
      • 2,877 Posts
      I have my users land on _registered users_ where they cant do much until I approve them for a higher by me choosen user group.
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 4310
        • 2,310 Posts
        You could easily have Weblogin set the new user to blocked by default.
          • 22840
          • 1,572 Posts
          Quote from: bunk58 at Feb 27, 2009, 08:10 AM

          You could easily have Weblogin set the new user to blocked by default.

          Been looking for that solution, how would I do that huh
            • 4310
            • 2,310 Posts
            Open assets/snippets/weblogin/websignup.inc.php.
            At around line 119 try replacing :
                // save user attributes
                $sql = "INSERT INTO ".$modx->getFullTableName("web_user_attributes")." (internalKey, fullname, email, zip, state, country) 
                        VALUES($key, '$fullname', '$email', '$zip', '$state', '$country');";

            With :
                // save user attributes
                $sql = "INSERT INTO ".$modx->getFullTableName("web_user_attributes")." (internalKey, fullname, email, zip, state, country, blocked) 
                        VALUES($key, '$fullname', '$email', '$zip', '$state', '$country', '1');";

            That should(untested) set each new web user to blocked on registration.
              • 22840
              • 1,572 Posts
              Hi bunk58, thanks for the answer.

              I have just tried that and it still didn’t set me as blocked after I registered, any other ideas huh

              Cheers
                • 4310
                • 2,310 Posts
                I’ve just tried it as a new user registering and it says I’m blocked when I try to login.
                Checked in the DB and it has blocked = 1.
                Looked in the Manager it it says blocked = Yes.
                Are you sure you edited the correct file huh