diff options
author | rxu <rxu@mail.ru> | 2017-12-19 00:05:58 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2017-12-19 00:05:58 +0700 |
commit | c077b90f8ba87749d0139d8389157acfe8ba3f15 (patch) | |
tree | d5e9d29beb521bc45fe99709d9a4f1c1514a1422 /phpBB/includes/functions_user.php | |
parent | 57772a0d327ff97490e952e275a0d26e70fea753 (diff) | |
download | forums-c077b90f8ba87749d0139d8389157acfe8ba3f15.tar forums-c077b90f8ba87749d0139d8389157acfe8ba3f15.tar.gz forums-c077b90f8ba87749d0139d8389157acfe8ba3f15.tar.bz2 forums-c077b90f8ba87749d0139d8389157acfe8ba3f15.tar.xz forums-c077b90f8ba87749d0139d8389157acfe8ba3f15.zip |
[ticket/15486] Add core event to the user_add() to modify notifications data
Additionally, fix some typos in two other events docblocks.
PHPBB3-15486
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c746bd0e4c..175cdeeda8 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -272,8 +272,8 @@ function user_add($user_row, $cp_data = false, $notifications_data = null) * 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 user_row Array of user details submitted to user_add + * @var array cp_data Array of Custom profile fields submitted to user_add * @var array sql_ary Array of data to be inserted when a user is added * @var array notifications_data Array of notification data to be inserted when a user is added * @since 3.1.0-a1 @@ -376,6 +376,19 @@ function user_add($user_row, $cp_data = false, $notifications_data = null) ); } + /** + * Modify the notifications data to be inserted in the database when a user is added + * + * @event core.user_add_modify_notifications_data + * @var array user_row Array of user details submitted to user_add + * @var array cp_data Array of Custom profile fields submitted to user_add + * @var array sql_ary Array of data to be inserted when a user is added + * @var array notifications_data Array of notification data to be inserted when a user is added + * @since 3.2.2-RC1 + */ + $vars = array('user_row', 'cp_data', 'sql_ary', 'notifications_data'); + extract($phpbb_dispatcher->trigger_event('core.user_add_modify_notifications_data', compact($vars))); + // Subscribe user to notifications if necessary if (!empty($notifications_data)) { @@ -388,12 +401,12 @@ function user_add($user_row, $cp_data = false, $notifications_data = null) } /** - * Event that returns user id, user detals and user CPF of newly registared user + * Event that returns user id, user details and user CPF of newly registered 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 + * @var int user_id User id of newly registered user + * @var array user_row Array of user details submitted to user_add + * @var array cp_data Array of Custom profile fields submitted to user_add * @since 3.1.0-b5 */ $vars = array('user_id', 'user_row', 'cp_data'); |