We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

New user alert/notification for Admin. | Forum

Rob - Admiraliteit Imedia

Has it already been considered to create a plugin that notifies the Admin that a new member has been registered by means of an E-mail to the E-mail address of the Admin.

There was once a plugin "New User Alert", but this developer is no longer present here at Oxwall or is no longer committed to its plugins or new plugins.


With regards,


Admiraliteit Imedia

Dev Forward
Dev Forward Aug 21
I haven't tested this at all. But you could try this.


In ow_system_plugins/base/bol/user_service.php:


Around line 1450, in the function sendWelcomeLetter()


You could try adding the following code at the bottom of the function -


$mail2 = OW::getMailer()->createMail();        

$mail2->addRecipientEmail('admin@mysite.com');        

$mail2->setSubject('A new user registered');        

$mail2->setTextContent('A new user registered');        

OW::getMailer()->send($mail2);


I didn't try this or test it at all. I'm not certain it's the right function, and it might not work. Use at your own risk. 

The Forum post is edited by Dev Forward Aug 21
Marcus
Marcus Aug 22
u need to set both
... 

setTextContent

and 

setHtmlContent

otherwise it will result in an error. 
Marcus
Marcus Aug 22
just create a pluging and bind sime function to user register event inside that function add mailer or create notification. which eill send out and email if u choce to get notified right away. 
Marcus
Marcus Aug 22
pls check store i bet there is a plug already. 
Dev Forward
Dev Forward Aug 22
Thanks Marcus, I wasn't aware of that. I hadn't tested it at all.


Here you go, Rob. 


You can change the subject and body of the email inside /classes/event_handler.php, if you'd like.

Attachments:
  notifyonregistration.zip (2Kb)
Marcus
Marcus Aug 22
case its not useful buddy for huge web sites. image getting thousands of emails every day. for small sites its greate if u wanna moderate or something each user. 
Marcus
Marcus Aug 22
Quote from Dev Forward Thanks Marcus, I wasn't aware of that. I hadn't tested it at all.


Here you go, Rob. 


You can change the subject and body of the email inside /classes/event_handler.php, if you'd like.

looks good add lang keys to make it great.