We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28373
    • 204 Posts
    This isn’t an email notification solution - but it does automatically ’Block’ new webusers when they signup. If a person creates a new web user account, and you want to ’approve’ new accounts before letting them loose, then all you do is manage web users and ’unblock’ anyone you deem to be approvable. This does mean checking web users ’sometimes... hahaha’ - but at least it’s better than having strangers signing up and having access immediately without any controls cool

    Edit websignupinc.php

    Change this code

    	// save user attributes
    	$sql = "INSERT INTO ".$modx->getFullTableName("web_user_attributes")." (internalKey, fullname, email, zip, state, country) 
    			VALUES($key, '$fullname', '$email', '$zip', '$state', '$country');";
    	$rs = $modx->db->query($sql);
    	if(!$rs){
    		$output = webLoginAlert("An error occured while attempting to save the user's attributes.").$tpl;
    		return;
    	}


    To this code
    
    	// save user attributes
    $blocked=1;
    	$sql = "INSERT INTO ".$modx->getFullTableName("web_user_attributes")." (internalKey, fullname, email, zip, state, country, blocked) 
    			VALUES($key, '$fullname', '$email', '$zip', '$state', '$country', '$blocked');";
    	$rs = $modx->db->query($sql);
    	if(!$rs){
    		$output = webLoginAlert("An error occured while attempting to save the user's attributes.").$tpl;
    		return;
    	}



    I tested and works purrrr fectly smiley
      • 6726
      • 7,075 Posts
      Cool Starbuck, that could come in handy, thanks !!!
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 18397
        • 3,250 Posts
        Starbuck, very cool code! In the future, please try and use [ code ] tags so that the content is both easier to read and encoded properly in our RSS feed. Thanks!
          • 28373
          • 204 Posts
          Quote from: Mark at May 14, 2006, 10:38 PM

          Starbuck, very cool code! In the future, please try and use [ code ] tags so that the content is both easier to read and encoded properly in our RSS feed. Thanks!

          Oh, hi Mark!

          Here’s the hack that sends you a copy of a new user registration event.

          In assets>snippets>weblogin

          Edit this file "websignup.inc.php"

          Locate this bit of code

          	// send email notification
          	$rt = webLoginSendNewPassword($email,$username,$password,$fullname);
          	if ($rt!==true) { // an error occured
          		$output = $rt.$tpl;
          		return;
          	}
          


          and change it to this...

          	// send email notification
          	$email .=', [email protected]';
          	$rt = webLoginSendNewPassword($email,$username,$password,$fullname);
          	if ($rt!==true) { // an error occured
          		$output = $rt.$tpl;
          		return;
          	}
          


          Tested, works, etc etc
            • 4273
            • 356 Posts
            this is not so much a notification as it is a sending a copy of the users login info, would be better to have it send a standard notification

            ie user1575 has just signed up at (website)

            anyway to do this ?
              SMF Bookmark Mod - check it out
              http://mods.simplemachines.org/index.php?mod=350
              • 28373
              • 204 Posts
              Quote from: bugsmi0 at Jun 19, 2006, 06:53 PM

              this is not so much a notification as it is a sending a copy of the users login info, would be better to have it send a standard notification

              ie user1575 has just signed up at (website)

              anyway to do this ?

              We changed ours so only "we" get the notification, and they don’t. We did this to prevent idiots signing up using someone elses email address .. probably not an issue for most of you modx people smiley We screen the address manually before sending a confirmation.


                • 4273
                • 356 Posts
                which of the sys events have to do with new websignup ?

                the plugin suggest to use OnWUsrFormSave but this one appears to be only when a user profile is updated, which one applies to websign up ?
                  SMF Bookmark Mod - check it out
                  http://mods.simplemachines.org/index.php?mod=350