phpBB

Code Changes

File: includes/ucp/ucp_remind.php

  Unmodified   Added   Modified   Removed
Line 48Line 48
			if (!check_form_key('ucp_remind'))
{
trigger_error('FORM_INVALID');

			if (!check_form_key('ucp_remind'))
{
trigger_error('FORM_INVALID');

 
			}

if (empty($email))
{
trigger_error('NO_EMAIL_USER');

			}

$sql_array = array(
'SELECT' => 'user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason',
'FROM' => array(USERS_TABLE => 'u'),

			}

$sql_array = array(
'SELECT' => 'user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason',
'FROM' => array(USERS_TABLE => 'u'),

				'WHERE'		=> "user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "'
AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"

				'WHERE'		=> "user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "'" .
(!empty($username) ? " AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : ''),

			);

/**

			);

/**

Line 74Line 79
			extract($phpbb_dispatcher->trigger_event('core.ucp_remind_modify_select_sql', compact($vars)));

$sql = $db->sql_build_query('SELECT', $sql_array);

			extract($phpbb_dispatcher->trigger_event('core.ucp_remind_modify_select_sql', compact($vars)));

$sql = $db->sql_build_query('SELECT', $sql_array);

			$result = $db->sql_query($sql);
$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

			$result = $db->sql_query_limit($sql, 2); // don't waste resources on more rows than we need
$rowset = $db->sql_fetchrowset($result);






			if (!$user_row)

			if (count($rowset) > 1)

			{

			{

				trigger_error('NO_EMAIL_USER');






				$db->sql_freeresult($result);

$template->assign_vars(array(
'USERNAME_REQUIRED' => true,
'EMAIL' => $email,
));

			}

			}

 
			else
{
$message = $user->lang['PASSWORD_UPDATED_IF_EXISTED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');





			if ($user_row['user_type'] == USER_IGNORE)

				if (empty($rowset))

			{

			{

				trigger_error('NO_USER');

					trigger_error($message);

			}


			}


			if ($user_row['user_type'] == USER_INACTIVE)




				$user_row = $rowset[0];
$db->sql_freeresult($result);

if (!$user_row)

			{

			{

				if ($user_row['user_inactive_reason'] == INACTIVE_MANUAL)
{
trigger_error('ACCOUNT_DEACTIVATED');

					trigger_error($message);



				}

				}

				else



if ($user_row['user_type'] == USER_IGNORE || $user_row['user_type'] == USER_INACTIVE)

				{

				{

					trigger_error('ACCOUNT_NOT_ACTIVATED');
}

					trigger_error($message);


			}

// Check users permissions

			}

// Check users permissions

Line 106Line 119

if (!$auth2->acl_get('u_chgpasswd'))
{


if (!$auth2->acl_get('u_chgpasswd'))
{

				send_status_line(403, 'Forbidden');
trigger_error('NO_AUTH_PASSWORD_REMINDER');

					trigger_error($message);


			}

$server_url = generate_board_url();

			}

$server_url = generate_board_url();

Line 146Line 158

$messenger->send($user_row['user_notify_type']);



$messenger->send($user_row['user_notify_type']);


			meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));

$message = $user->lang['PASSWORD_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');

 
			trigger_error($message);

			trigger_error($message);

 
			}

		}

$template->assign_vars(array(

		}

$template->assign_vars(array(