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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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;