aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-06-22 22:57:40 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-06-22 22:57:40 +0200
commit1e97502d907ff8ed127b3a552b4c1b6dbff51453 (patch)
tree7ad9c2d65d3f9c74555077da7f875b186bfa3be0
parent80ac276971908ee8aa4ccd1941b79f7aaf93c523 (diff)
parent152d5fc263a7f5a32e63c5b125e0b6a1cead71e7 (diff)
downloadforums-1e97502d907ff8ed127b3a552b4c1b6dbff51453.tar
forums-1e97502d907ff8ed127b3a552b4c1b6dbff51453.tar.gz
forums-1e97502d907ff8ed127b3a552b4c1b6dbff51453.tar.bz2
forums-1e97502d907ff8ed127b3a552b4c1b6dbff51453.tar.xz
forums-1e97502d907ff8ed127b3a552b4c1b6dbff51453.zip
Merge pull request #2586 from lucifer4o/ticket/12701
[Ticket/12701] Add events to user_add function * lucifer4o/ticket/12701: [ticket/12701] Add change [ticket/12701] Rmove before event and expand modify_data [ticket/12701] Add events to user_add function
-rwxr-xr-x[-rw-r--r--]phpBB/includes/functions_user.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 5a10f9f411..f22f84ee97 100644..100755
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -261,10 +261,13 @@ function user_add($user_row, $cp_data = false)
* Use this event to modify the values to be inserted when a user is added
*
* @event core.user_add_modify_data
+ * @var array user_row Array of user details submited to user_add
+ * @var array cp_data Array of Custom profile fields submited to user_add
* @var array sql_ary Array of data to be inserted when a user is added
* @since 3.1.0-a1
+ * @change 3.1.0-b5
*/
- $vars = array('sql_ary');
+ $vars = array('user_row', 'cp_data', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.user_add_modify_data', compact($vars)));
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
@@ -344,6 +347,18 @@ function user_add($user_row, $cp_data = false)
set_config('newest_user_colour', $row['group_colour'], true);
}
+ /**
+ * Event that returns user id, user detals and user CPF of newly registared user
+ *
+ * @event core.user_add_after
+ * @var int user_id User id of newly registared user
+ * @var array user_row Array of user details submited to user_add
+ * @var array cp_data Array of Custom profile fields submited to user_add
+ * @since 3.1.0-b5
+ */
+ $vars = array('user_id', 'user_row', 'cp_data');
+ extract($phpbb_dispatcher->trigger_event('core.user_add_after', compact($vars)));
+
return $user_id;
}