Add hook before create user

This commit is contained in:
Marco Antonio Nina
2013-03-20 10:58:19 -04:00
parent 1fb92234c2
commit 638cdee160
7 changed files with 39 additions and 6 deletions

View File

@@ -193,6 +193,14 @@ class RbacUsers extends BaseRbacUsers
public function create($aData)
{
$pluginRegistry = & PMPluginRegistry::getSingleton();
if ($pluginRegistry->existsTrigger(PM_BEFORE_CREATE_USER)) {
try {
$pluginRegistry->executeTriggers(PM_BEFORE_CREATE_USER);
} catch(Exception $error) {
throw new Exception($error->getMessage());
}
}
$oConnection = Propel::getConnection(RbacUsersPeer::DATABASE_NAME);
try {
$oRBACUsers = new RbacUsers();