mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12701] Rmove before event and expand modify_data
Removing core.user_add_before Adding $user_row and $cp_data to core.user_add_modify_data PHPBB3-12701
This commit is contained in:
parent
dd075e4bbc
commit
165c5f8f15
1 changed files with 4 additions and 13 deletions
|
@ -180,17 +180,6 @@ function user_add($user_row, $cp_data = false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Event to parse/modify data submited to user_add function
|
|
||||||
*
|
|
||||||
* @event core.user_add_before
|
|
||||||
* @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_row', 'cp_data');
|
|
||||||
extract($phpbb_dispatcher->trigger_event('core.user_add_before', compact($vars)));
|
|
||||||
|
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'username' => $user_row['username'],
|
'username' => $user_row['username'],
|
||||||
'username_clean' => $username_clean,
|
'username_clean' => $username_clean,
|
||||||
|
@ -272,10 +261,12 @@ function user_add($user_row, $cp_data = false)
|
||||||
* Use this event to modify the values to be inserted when a user is added
|
* Use this event to modify the values to be inserted when a user is added
|
||||||
*
|
*
|
||||||
* @event core.user_add_modify_data
|
* @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
|
* @var array sql_ary Array of data to be inserted when a user is added
|
||||||
* @since 3.1.0-a1
|
* @since 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)));
|
extract($phpbb_dispatcher->trigger_event('core.user_add_modify_data', compact($vars)));
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||||
|
|
Loading…
Add table
Reference in a new issue