phpBB

Code Changes

File: includes/ucp/ucp_profile.php

  Unmodified   Added   Modified   Removed
Line 183Line 183

if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{


if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{

								// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
$admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();

// Also include founders
$where_sql = ' WHERE user_type = ' . USER_FOUNDER;

if (sizeof($admin_ary))
{
$where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
}

$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
FROM ' . USERS_TABLE . ' ' .
$where_sql;
$result = $db->sql_query($sql);

while ($row = $db->sql_fetchrow($result))
{
$messenger->template('admin_activate', $row['user_lang']);
$messenger->set_addresses($row);

$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($data['username']),
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
);

$messenger->send($row['user_notify_type']);
}
$db->sql_freeresult($result);

								$notifications_manager = $phpbb_container->get('notification_manager');
$notifications_manager->add_notifications('notification.type.admin_activate_user', array(
'user_id' => $user->data['user_id'],
'user_actkey' => $user_actkey,
'user_regdate' => time(), // Notification time
));


























							}

user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE);

							}

user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE);

Line 503Line 478
					if (!sizeof($error))
{
$message_parser = new parse_message($signature);

					if (!sizeof($error))
{
$message_parser = new parse_message($signature);

 

/**
* Modify user signature on editing profile in UCP
*
* @event core.ucp_profile_modify_signature
* @var bool enable_bbcode Whether or not bbcode is enabled
* @var bool enable_smilies Whether or not smilies are enabled
* @var bool enable_urls Whether or not urls are enabled
* @var string signature Users signature text
* @var object message_parser The message parser object
* @var array error Any error strings
* @var bool submit Whether or not the form has been sumitted
* @var bool preview Whether or not the signature is being previewed
* @since 3.1.10-RC1
*/
$vars = array(
'enable_bbcode',
'enable_smilies',
'enable_urls',
'signature',
'message_parser',
'error',
'submit',
'preview',
);
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars)));


// Allowing Quote BBCode
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');


// Allowing Quote BBCode
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');

Line 529Line 530
								'user_sig_bbcode_uid'		=> (string) $message_parser->bbcode_uid,
'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield
);

								'user_sig_bbcode_uid'		=> (string) $message_parser->bbcode_uid,
'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield
);

 

/**
* Modify user registration data before submitting it to the database
*
* @event core.ucp_profile_modify_signature_sql_ary
* @var array sql_ary Array with user signature data to submit to the database
* @since 3.1.10-RC1
*/
$vars = array('sql_ary');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature_sql_ary', compact($vars)));


$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '


$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '

Line 621Line 632
										'user_avatar_width' => $result['avatar_width'],
'user_avatar_height' => $result['avatar_height'],
);

										'user_avatar_width' => $result['avatar_width'],
'user_avatar_height' => $result['avatar_height'],
);

 

/**
* Trigger events on successfull avatar change
*
* @event core.ucp_profile_avatar_sql
* @var array result Array with data to be stored in DB
* @since 3.1.11-RC1
*/
$vars = array('result');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_avatar_sql', compact($vars)));


$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $result) . '
WHERE user_id = ' . (int) $user->data['user_id'];


$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $result) . '
WHERE user_id = ' . (int) $user->data['user_id'];



 
									$db->sql_query($sql);

meta_refresh(3, $this->u_action);

									$db->sql_query($sql);

meta_refresh(3, $this->u_action);

Line 662Line 682
					}

$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user->data['user_avatar_type']));

					}

$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user->data['user_avatar_type']));

 

$template->assign_vars(array(
'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
));


foreach ($avatar_drivers as $current_driver)
{


foreach ($avatar_drivers as $current_driver)
{