From 4f6f0c08979d420a47f5cc4bcab2709d27853222 Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 21 Aug 2012 17:04:16 -0400 Subject: [PATCH] [feature/add_events] Event to modify the data array for when a user is added PHPBB3-9550 --- phpBB/includes/functions_user.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 9e33a5122e..f4ecb7cdc3 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -255,6 +255,16 @@ 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 sql_ary Array of data to be inserted when a user is added + * @since 3.1-A1 + */ + $vars = array('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); $db->sql_query($sql);