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

[Solution available] Run custom script on user create/modification | Forum

Jonas Svendsen
Jonas Svendsen May 7 '15

How can I run a custom php script each time a user is registered or modified?

Thanks !

The Forum post is edited by Alia May 15 '15
Alia Team
Alia May 14 '15
NetzaH, what should that custom php script do?

General answer giving that I don't have much information on what you would like to achieve is to try and modify join/profile edit related .php/.html files.

PHP files are located in  ow_system_plugins/base/controllers directory ( join.php and edit.php).

HTML files are located in ow_system_plugin/base/views/controllers/ directory ( join_index.html, edit_index.html).



Jonas Svendsen
Jonas Svendsen May 14 '15
Thanks Aliia, it's a php script that exports users data to a csv for use in a GIS. Finally i decided to run it through cron to avoid excessive uses with a huge number of users. 

Thanks for you reply, this is valuable information for me also :)

Nickolay
Nickolay May 14 '15
Just use Oxwall Events:


OW::getEventManager()->bind(OW_EventManager::ON_USER_REGISTER, 'yourCustom HandlerFunction');


plus on edit OW_EventManager::ON_USER_EDIT (and OW_EventManager::ON_USER_EDIT_BY_ADMIN if needed) events.

Jonas Svendsen
Jonas Svendsen May 14 '15
Thats nice, Nickolay, ill give it a try, thanks ! :)
Alia Team
Alia May 15 '15
Thanks, Nikolay.