Is there an easy way to auto-activate new users as agents, such as a url or a hidden setting?
For instance, my website serves one main purpose: to post local classifieds. It is silly to have to check for new users all the time.
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.
Is there an easy way to auto-activate new users as agents, such as a url or a hidden setting?
For instance, my website serves one main purpose: to post local classifieds. It is silly to have to check for new users all the time.
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;