UBB.Dev
Posted By: cessnamike Notify administrator of new user - 05/18/2001 2:53 AM
Under Perl, we had installed a hack which sent me (as administrator) an e-mail whenever a new user registered. This alerted me to assign the new user to the appropriate groups -- essentially setting permissions for that individual.

Has anybody developed a similar hack for the PHP version? Or is there a better method?

Thanks,

Mike Sheridan

Posted By: The Team Re: Notify administrator of new user - 05/18/2001 12:45 PM
I would be very interested in a similar hack BUT make it a Private Message on the board instead.

Also configurable who will receive the PM (2 admins doing different jobs)

Posted By: Magicia Re: Notify administrator of new user - 05/18/2001 1:40 PM
This would be great to have!

Magicia (Site Manager)
http://www.world-gaming.cc
Posted By: poil Re: Notify administrator of new user - 05/18/2001 4:17 PM
make sure to back all files that you have. this will send a pm to the admin of the board on a new registration. if you want it to go to a different person, it will look different, if anyone wants that just post so and i will show how it can be done. in two seconds i will have an email the admin version, i personally like the pm. open up adduser.php and find the line that says:
 // ------------------------------------- // Now we need to mail them the password 
and above that add:
 // Now pm the admin about a new user $subject3 = "New user has Subscribed!"; $body     = "A new user by the name of $Username_q has registered on your forums."; $subject3_q = addslashes($subject3); $body_q = addslashes($body);       $query = "          INSERT INTO w3t_Messages (M_Username,M_Status,M_Subject,M_Sender,M_Message,M_Sent)          VALUES ('$Sender_q','$Messstat_q','$subject3_q','$Sender_q','$body_q','$date')       ";       $dbh -> do_query($query); 
so it looks like this:
 // Now pm the admin about a new user $subject3 = "New user has Subscribed!"; $body     = "A new user by the name of $Username_q has registered on your forums."; $subject3_q = addslashes($subject3); $body_q = addslashes($body);       $query = "          INSERT INTO w3t_Messages (M_Username,M_Status,M_Subject,M_Sender,M_Message,M_Sent)          VALUES ('$Sender_q','$Messstat_q','$subject3_q','$Sender_q','$body_q','$date')       ";       $dbh -> do_query($query);   // ------------------------------------- // Now we need to mail them the password 
i also uploaded the text file, for who knows sake.

[:red]--------------
http://extremeforums.org

Attached File
36249-pmonnewuser.txt  (53 downloads)
Posted By: poil Re: Notify administrator of new user - 05/18/2001 4:26 PM
make sure to back all files that you have. this will send an email to the admin, when a new user registers on your board. the email can be sent to anyone that you want. you just have to change the line $from = $config[emailaddy]; to the email adress that you want it to go to example: $from = "[email protected]"; open up adduser.php and find the line that says:
 // ------------------------------------- // Now we need to mail them the password 
and above that add:
 // Email the admin about a new User $subject3 = "New user has Subscribed!"; $body     = "A new user by the name of $Username_q has registered on your forums."; $from     = $config[emailaddy]; $mailsend = mail("$from","$subject3","$body","From: $from"); 
so it looks like this:
 // Email the admin about a new User $subject3 = "New user has Subscribed!"; $body     = "A new user by the name of $Username_q has registered on your forums."; $from     = $config[emailaddy]; $mailsend = mail("$from","$subject3","$body","From: $from");  // ------------------------------------- // Now we need to mail them the password 


[:red]--------------
http://extremeforums.org

Attached File
36250-emailonnewuser.txt  (47 downloads)
Posted By: cessnamike Re: Notify administrator of new user - 05/21/2001 2:26 AM
Thanks a bunch. That looks like what I needed.

Mike

© UBB.Developers