1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/13675] Add validate to acp_profile event and add template events

for acp users profile

PHPBB3-13675
This commit is contained in:
Richard McGirr
2015-03-06 07:26:35 -05:00
parent 525a62f72e
commit 6b87e06292
3 changed files with 38 additions and 2 deletions

View File

@@ -1414,6 +1414,18 @@ class acp_users
$error[] = 'FORM_INVALID';
}
/**
* Validate profile data in ACP before submitting to the database
*
* @event core.acp_users_profile_validate
* @var bool submit Flag indicating if submit button has been pressed
* @var array data Array with user profile data
* @var array error Array with the form errors
* @since 3.1.4-RC1
*/
$vars = array('submit', 'data', 'error');
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
if (!sizeof($error))
{
$sql_ary = array(
@@ -1429,9 +1441,10 @@ class acp_users
* @var array data Array with user profile data
* @var int user_id The user id
* @var array user_row Array with the full user data
* @var array sql_ary Array with sql data
* @since 3.1.4-RC1
*/
$vars = array('cp_data', 'data', 'user_id', 'user_row');
$vars = array('cp_data', 'data', 'user_id', 'user_row', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_modify_sql_ary', compact($vars)));
$sql = 'UPDATE ' . USERS_TABLE . '