function main($id, $mode) { global $config, $phpbb_root_path, $phpEx;
|
function main($id, $mode) { global $config, $phpbb_root_path, $phpEx;
|
global $db, $user, $auth, $template, $phpbb_container;
| global $db, $user, $auth, $template, $phpbb_container, $phpbb_dispatcher;
|
$username = request_var('username', '', true); $email = strtolower(request_var('email', '')); $submit = (isset($_POST['submit'])) ? true : false;
|
$username = request_var('username', '', true); $email = strtolower(request_var('email', '')); $submit = (isset($_POST['submit'])) ? true : false;
|
$sql = 'SELECT user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason FROM ' . USERS_TABLE . " WHERE user_email_hash = '" . $db->sql_escape(phpbb_email_hash($email)) . "' AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
| if (!check_form_key('ucp_remind')) { trigger_error('FORM_INVALID'); }
$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)) . "'" );
/** * 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);
|