phpBB

Code Changes

File: includes/functions_user.php

  Unmodified   Added   Modified   Removed
Line 210Line 210

// These are the additional vars able to be specified
$additional_vars = array(


// These are the additional vars able to be specified
$additional_vars = array(

		'user_permissions'	=> '',
'user_timezone' => $config['board_timezone'],
'user_dateformat' => $config['default_dateformat'],
'user_lang' => $config['default_lang'],
'user_style' => (int) $config['default_style'],
'user_actkey' => '',
'user_ip' => '',
'user_regdate' => time(),
'user_passchg' => time(),
'user_options' => 230271,

		'user_permissions'			=> '',
'user_timezone' => $config['board_timezone'],
'user_dateformat' => $config['default_dateformat'],
'user_lang' => $config['default_lang'],
'user_style' => (int) $config['default_style'],
'user_actkey' => '',
'user_ip' => '',
'user_regdate' => time(),
'user_passchg' => time(),
'user_options' => 230271,

		// We do not set the new flag here - registration scripts need to specify it

		// We do not set the new flag here - registration scripts need to specify it

		'user_new'			=> 0,

		'user_new'					=> 0,


'user_inactive_reason' => 0,
'user_inactive_time' => 0,


'user_inactive_reason' => 0,
'user_inactive_time' => 0,

Line 425Line 425
/**
* Delete user(s) and their related data
*

/**
* Delete user(s) and their related data
*

 * @param string	$mode				Mode of posts deletion (retain|delete)

 * @param string	$mode				Mode of posts deletion (retain|remove)

 * @param mixed		$user_ids			Either an array of integers or an integer
* @param bool $retain_username True if username should be retained, false otherwise
* @return bool

 * @param mixed		$user_ids			Either an array of integers or an integer
* @param bool $retain_username True if username should be retained, false otherwise
* @return bool

Line 464Line 464
	 * Event before of the performing of the user(s) delete action
*
* @event core.delete_user_before

	 * Event before of the performing of the user(s) delete action
*
* @event core.delete_user_before

	 * @var string	mode				Mode of posts deletion (retain|delete)

	 * @var string	mode				Mode of posts deletion (retain|remove)

	 * @var array	user_ids			ID(s) of the user(s) bound to be deleted
* @var bool retain_username True if username should be retained, false otherwise
* @var array user_rows Array containing data of the user(s) bound to be deleted

	 * @var array	user_ids			ID(s) of the user(s) bound to be deleted
* @var bool retain_username True if username should be retained, false otherwise
* @var array user_rows Array containing data of the user(s) bound to be deleted

Line 774Line 774
	 * Event after the user(s) delete action has been performed
*
* @event core.delete_user_after

	 * Event after the user(s) delete action has been performed
*
* @event core.delete_user_after

	 * @var string	mode				Mode of posts deletion (retain|delete)

	 * @var string	mode				Mode of posts deletion (retain|remove)

	 * @var array	user_ids			ID(s) of the deleted user(s)
* @var bool retain_username True if username should be retained, false otherwise
* @var array user_rows Array containing data of the deleted user(s)

	 * @var array	user_ids			ID(s) of the deleted user(s)
* @var bool retain_username True if username should be retained, false otherwise
* @var array user_rows Array containing data of the deleted user(s)

Line 797Line 797
* Flips user_type from active to inactive and vice versa, handles group membership updates
*
* @param string $mode can be flip for flipping from active/inactive, activate or deactivate

* Flips user_type from active to inactive and vice versa, handles group membership updates
*
* @param string $mode can be flip for flipping from active/inactive, activate or deactivate

 
* @param array $user_id_ary
* @param int $reason

*/
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
{

*/
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
{

Line 919Line 921
* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
* @param boolean $ban_exclude Exclude these entities from banning?
* @param string $ban_reason String describing the reason for this ban

* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
* @param boolean $ban_exclude Exclude these entities from banning?
* @param string $ban_reason String describing the reason for this ban

 
* @param string $ban_give_reason

* @return boolean
*/
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')

* @return boolean
*/
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')

Line 1510Line 1513
		$ipwhois = (empty($buffer)) ? $ipwhois : $buffer;
}


		$ipwhois = (empty($buffer)) ? $ipwhois : $buffer;
}


	$ipwhois = htmlspecialchars($ipwhois);

	$ipwhois = htmlspecialchars($ipwhois, ENT_COMPAT);


// Magic URL ;)
return trim(make_clickable($ipwhois, false, ''));


// Magic URL ;)
return trim(make_clickable($ipwhois, false, ''));

Line 1572Line 1575
		return false;
}


		return false;
}


	if ($min && utf8_strlen(htmlspecialchars_decode($string)) < $min)

	if ($min && utf8_strlen(html_entity_decode($string, ENT_COMPAT)) < $min)

	{
return 'TOO_SHORT';
}

	{
return 'TOO_SHORT';
}

	else if ($max && utf8_strlen(htmlspecialchars_decode($string)) > $max)

	else if ($max && utf8_strlen(html_entity_decode($string, ENT_COMPAT)) > $max)

	{
return 'TOO_LONG';
}

	{
return 'TOO_LONG';
}

Line 1611Line 1614
/**
* Validate Date
* @param string $date_string a date in the dd-mm-yyyy format

/**
* Validate Date
* @param string $date_string a date in the dd-mm-yyyy format

 
* @param	bool $optional

* @return	boolean
*/
function validate_date($date_string, $optional = false)

* @return	boolean
*/
function validate_date($date_string, $optional = false)

Line 1748Line 1752
	}

// ... fast checks first.

	}

// ... fast checks first.

	if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false || empty($clean_username))


	if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false || empty($clean_username)
|| preg_match('/[\x{180E}\x{2005}-\x{200D}\x{202F}\x{205F}\x{2060}\x{FEFF}]/u', $username))

	{
return 'INVALID_CHARS';
}

	{
return 'INVALID_CHARS';
}

Line 1882Line 1887
* Check to see if email address is a valid address and contains a MX record
*
* @param string $email The email to check

* Check to see if email address is a valid address and contains a MX record
*
* @param string $email The email to check

 
* @param $config

*
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/

*
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/

Line 3621Line 3627
/**
* Funtion to make a user leave the NEWLY_REGISTERED system group.
* @access public

/**
* Funtion to make a user leave the NEWLY_REGISTERED system group.
* @access public

* @param $user_id The id of the user to remove from the group


* @param int $user_id The id of the user to remove from the group
* @param mixed $user_data The id of the user to remove from the group

*/
function remove_newly_registered($user_id, $user_data = false)
{

*/
function remove_newly_registered($user_id, $user_data = false)
{