View Single Post
Old 02-05-2015, 02:49 PM   #1
Junior Member
Join Date: Jan 2015
Posts: 28
mduh is on a distinguished road
Default ispmgr 5 business: event handler


I am trying to write event handler that will be executed after new user is added. I can not get it working, seems that handler is not registered.

Content of /usr/local/mgr5/etc/xml/ispmgr_mod_useradd.xml

<?xml version="1.0" encoding="UTF-8"?>
  <handler name="uh-useradd.php" type="cgi">
    <event after="yes">user.add</event>
Content of /usr/local/mgr5/addon/uh-useradd.php

file_put_contents('/usr/local/mgr5/var/uh-ispmgr.log', "\n".date('Y-m-d H:i:s'), FILE_APPEND);
As you can see all the plugin do is just write log message. Right now I can not see any log entries, so it is not executed.

BTW: I used such an approach in version 4 of ispsystem products and there was no problem.

mduh is offline   Reply With Quote