phpBB

Code Changes

File: phpbb/session.php

  Unmodified   Added   Modified   Removed
Line 1457Line 1457
	*/
function set_login_key($user_id = false, $key = false, $user_ip = false)
{

	*/
function set_login_key($user_id = false, $key = false, $user_ip = false)
{

		global $db;

		global $db, $phpbb_dispatcher;


$user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
$user_ip = ($user_ip === false) ? $this->ip : $user_ip;


$user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
$user_ip = ($user_ip === false) ? $this->ip : $user_ip;

Line 1489Line 1489
		{
$sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
}

		{
$sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
}

 

/**
* Event to adjust autologin keys process
*
* @event core.set_login_key
* @var string|false key Current autologin key if exists, false otherwise
* @var string key_id New autologin key
* @var string sql SQL query to update/insert autologin key
* @var array sql_ary Aray with autologin key data
* @var int user_id Current user's ID
* @var string user_ip Current user's IP address
* @since 3.3.2-RC1
*/
$vars = [
'key',
'key_id',
'sql',
'sql_ary',
'user_id',
'user_ip',
];
extract($phpbb_dispatcher->trigger_event('core.set_login_key', compact($vars)));


		$db->sql_query($sql);

$this->cookie_data['k'] = $key_id;

		$db->sql_query($sql);

$this->cookie_data['k'] = $key_id;