mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
Merge branch '3.1.x' into 3.2.x
This commit is contained in:
commit
b1e4b232b9
1 changed files with 25 additions and 5 deletions
|
@ -30,7 +30,7 @@ class ucp_remind
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx, $request;
|
global $config, $phpbb_root_path, $phpEx, $request;
|
||||||
global $db, $user, $template, $phpbb_container;
|
global $db, $user, $template, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
if (!$config['allow_password_reset'])
|
if (!$config['allow_password_reset'])
|
||||||
{
|
{
|
||||||
|
@ -43,10 +43,30 @@ class ucp_remind
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
|
$sql_array = array(
|
||||||
FROM ' . USERS_TABLE . "
|
'SELECT' => 'user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason',
|
||||||
WHERE user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "'
|
'FROM' => array(USERS_TABLE => 'u'),
|
||||||
AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
'WHERE' => "user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "'
|
||||||
|
AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change SQL query for fetching user data
|
||||||
|
*
|
||||||
|
* @event core.ucp_remind_modify_select_sql
|
||||||
|
* @var string email User's email from the form
|
||||||
|
* @var string username User's username from the form
|
||||||
|
* @var array sql_array Fully assembled SQL query with keys SELECT, FROM, WHERE
|
||||||
|
* @since 3.1.11-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'email',
|
||||||
|
'username',
|
||||||
|
'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);
|
$result = $db->sql_query($sql);
|
||||||
$user_row = $db->sql_fetchrow($result);
|
$user_row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue