diff options
author | Richard McGirr <rmcgirr83@gmail.com> | 2015-03-06 07:26:35 -0500 |
---|---|---|
committer | Richard McGirr <rmcgirr83@gmail.com> | 2015-03-06 07:26:35 -0500 |
commit | 6b87e062929c6a6bb115c99d1851b1d0cd3fa6ee (patch) | |
tree | d3741795a21f6e9ee7531c75925ba196ecee1947 /phpBB/includes/acp/acp_users.php | |
parent | 525a62f72e872f8d19e2ec3f2e1c105e9fae4f75 (diff) | |
download | forums-6b87e062929c6a6bb115c99d1851b1d0cd3fa6ee.tar forums-6b87e062929c6a6bb115c99d1851b1d0cd3fa6ee.tar.gz forums-6b87e062929c6a6bb115c99d1851b1d0cd3fa6ee.tar.bz2 forums-6b87e062929c6a6bb115c99d1851b1d0cd3fa6ee.tar.xz forums-6b87e062929c6a6bb115c99d1851b1d0cd3fa6ee.zip |
[ticket/13675] Add validate to acp_profile event and add template events
for acp users profile
PHPBB3-13675
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 3c957a7093..8c17fb6311 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -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 . ' |