aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 96881b1df..358abc133 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -342,8 +342,14 @@
// Insert it
$result = insert_data("INSERT into {$CONFIG->dbprefix}users_entity (guid, name, username, password, email, language, code) values ($guid, '$name', '$username', '$password', '$email', '$language', '$code')");
- if ($result!==false)
- return true;
+ if ($result!==false) {
+ $entity = get_entity($guid);
+ if (trigger_event('create',$entity->type,$entity)) {
+ return true;
+ } else {
+ delete_entity($guid);
+ }
+ }
}
return false;