mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-20 07:42:09 +02:00
Merge pull request #3473 from RMcGirr83/ticket/13675
[ticket/13675] Add validate to acp_profile event and add template events
This commit is contained in:
commit
d7f4715b96
@ -2,6 +2,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_USER_PROFILE}</legend>
|
||||
<!-- EVENT acp_users_profile_before -->
|
||||
<dl>
|
||||
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
|
||||
<dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
|
||||
@ -10,6 +11,7 @@
|
||||
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
|
||||
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_users_profile_after -->
|
||||
</fieldset>
|
||||
|
||||
<!-- IF .profile_fields -->
|
||||
@ -26,7 +28,7 @@
|
||||
<!-- END profile_fields -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT acp_users_profile_custom_after -->
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
{S_FORM_TOKEN}
|
||||
|
@ -177,6 +177,27 @@ acp_ranks_list_header_before
|
||||
* Purpose: Add content after the last header-column (but before the action column)
|
||||
in the ranks list in the ACP
|
||||
|
||||
acp_users_profile_before
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the profile details when editing a user in the ACP
|
||||
|
||||
acp_users_profile_after
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the profile details but before the custom profile fields when editing a user in the ACP
|
||||
|
||||
acp_users_profile_custom_after
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the the custom profile fields when editing a user in the ACP
|
||||
|
||||
acp_simple_footer_after
|
||||
===
|
||||
* Location: adm/style/simple_footer.html
|
||||
|
@ -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 . '
|
||||
|
Loading…
x
Reference in New Issue
Block a user