Menu

automatic agent upon registration

Help
xorprime
2005-02-17
2013-04-08
  • xorprime

    xorprime - 2005-02-17

    where in the code can i put an automatic activation of a user after registration. we are using phpwslistings for an open market classifieds and we do not want to cause a delay for new users. i would like to know where i can place a code that will insert the correct values in mod_user_vars the activation for an agent.

     
    • xorprime

      xorprime - 2005-02-22

      courtesy of my friend chomatz who continued my quest

      line 819  /mod/users/class/Users.php

          if(PHPWS_User::mailInvitation($email, $message)){
         
            /* =================== */
            /* modified by chomatz */
            /* =================== */
            $insert = array ("username"=>$username, "password"=>md5($password), "email"=>$email);
           
            /* writes to the db and temporarily stores the array to be returned */
            $tmpReturn = $GLOBALS["core"]->sqlInsert($insert, "mod_users", 1);
           
            /* gets the newly added user record */
            $tmpVar=$GLOBALS["core"]->sqlSelect("mod_users", "username", $username);
           
            /* inserts specified values into mod_user_uservar */
            $insert=array("user_id"=>$tmpVar[0]["user_id"], "module_title"=>"phpwslistings", "varName"=>"active", "varValue"=>1);
            $GLOBALS["core"]->sqlInsert($insert, "mod_user_uservar", 1);
           
            /* returns the temporary array */
            return $tmpReturn;

       

Log in to post a comment.