'u.*, g.g_id, g.g_user_title, g.g_moderator', 'FROM' => 'users AS u', 'JOINS' => array( array( 'LEFT JOIN' => 'groups AS g', 'ON' => 'g.g_id=u.group_id' ) ), 'WHERE' => 'u.id='.$id ); ($hook = get_hook('pf_qr_get_user_info')) ? eval($hook) : null; $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); $user = $forum_db->fetch_assoc($result); if (!$user) message($lang_common['Bad request']); if ($action == 'change_pass') { ($hook = get_hook('pf_change_pass_selected')) ? eval($hook) : null; // User pressed the cancel button if (isset($_POST['cancel'])) redirect(forum_link($forum_url['profile_about'], $id), $lang_common['Cancel redirect']); if (isset($_GET['key'])) { $key = $_GET['key']; // If the user is already logged in we shouldn't be here :) if (!$forum_user['is_guest']) message($lang_profile['Pass logout']); ($hook = get_hook('pf_change_pass_key_supplied')) ? eval($hook) : null; if ($key == '' || $key != $user['activate_key']) message(sprintf($lang_profile['Pass key bad'], ''.forum_htmlencode($forum_config['o_admin_email']).'')); else { if (isset($_POST['form_sent'])) { ($hook = get_hook('pf_change_pass_key_form_submitted')) ? eval($hook) : null; $new_password1 = forum_trim($_POST['req_new_password1']); $new_password2 = ($forum_config['o_mask_passwords'] == '1') ? forum_trim($_POST['req_new_password2']) : $new_password1; if (utf8_strlen($new_password1) < 4) $errors[] = $lang_profile['Pass too short']; else if ($new_password1 != $new_password2) $errors[] = $lang_profile['Pass not match']; // Did everything go according to plan? if (empty($errors)) { $new_password_hash = forum_hash($new_password1, $user['salt']); $query = array( 'UPDATE' => 'users', 'SET' => 'password=\''.$new_password_hash.'\', activate_key=NULL', 'WHERE' => 'id='.$id ); ($hook = get_hook('pf_change_pass_key_qr_update_password')) ? eval($hook) : null; $forum_db->query_build($query) or error(__FILE__, __LINE__); // Add flash message $forum_flash->add_info($lang_profile['Pass updated']); ($hook = get_hook('pf_change_pass_key_pre_redirect')) ? eval($hook) : null; redirect(forum_link($forum_url['index']), $lang_profile['Pass updated']); } } // Is this users own profile $forum_page['own_profile'] = ($forum_user['id'] == $id) ? true : false; // Setup form $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; $forum_page['form_action'] = forum_link($forum_url['change_password_key'], array($id, $key)); // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array(sprintf($lang_profile['Users profile'], $user['username'], $lang_profile['Section about']), forum_link($forum_url['profile_about'], $id)), ($forum_page['own_profile']) ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])) ); ($hook = get_hook('pf_change_pass_key_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE', 'profile-changepass'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('pf_change_pass_key_output_start')) ? eval($hook) : null; ?>
'.$lang_profile['E-mail info'].'
'; // Setup breadcrumbs $forum_page['crumbs'] = array( array($forum_config['o_board_title'], forum_link($forum_url['index'])), array(sprintf($lang_profile['Users profile'], $user['username'], $lang_profile['Section about']), forum_link($forum_url['profile_about'], $id)), ($forum_page['own_profile']) ? $lang_profile['Change your e-mail'] : sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username'])) ); ($hook = get_hook('pf_change_email_normal_pre_header_load')) ? eval($hook) : null; define('FORUM_PAGE', 'profile-changemail'); require FORUM_ROOT.'header.php'; // START SUBST - ob_start(); ($hook = get_hook('pf_change_email_normal_output_start')) ? eval($hook) : null; ?>