'.$lang_common['Required'].'') ?>
'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 = $pun_db->query_build($query) or error(__FILE__, __LINE__); if (!$pun_db->num_rows($result)) message($lang_common['Bad request']); $user = $pun_db->fetch_assoc($result); if ($action == 'change_pass') { ($hook = get_hook('pf_change_pass_selected')) ? eval($hook) : null; // User pressed the cancel button if (isset($_POST['cancel'])) redirect(pun_link($pun_url['profile_about'], $id), $lang_common['Cancel redirect']); if (isset($_GET['key'])) { // If the user is already logged in we shouldn't be here :) if (!$pun_user['is_guest']) message($lang_profile['Pass logout']); ($hook = get_hook('pf_change_pass_key_supplied')) ? eval($hook) : null; $key = $_GET['key']; if ($key == '' || $key != $user['activate_key']) message(sprintf($lang_profile['Pass key bad'], ''.$pun_config['o_admin_email'].'')); else { if (isset($_POST['form_sent'])) { ($hook = get_hook('pf_change_pass_key_form_submitted')) ? eval($hook) : null; $new_password1 = trim($_POST['req_new_password1']); $new_password2 = trim($_POST['req_new_password2']); if (pun_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 = sha1($user['salt'].sha1($new_password1)); $query = array( 'UPDATE' => 'users', 'SET' => 'password=\''.$new_password_hash.'\', activate_key=NULL', 'WHERE' => 'id='.$id ); ($hook = get_hook('pf_qr_update_password')) ? eval($hook) : null; $pun_db->query_build($query) or error(__FILE__, __LINE__); redirect(pun_link($pun_url['index']), $lang_profile['Pass updated']); } } // Setup form $pun_page['set_count'] = $pun_page['fld_count'] = 0; $pun_page['form_action'] = pun_link($pun_url['change_password_key'], array($id, $key)); // Setup breadcrumbs $pun_page['crumbs'] = array( array($pun_config['o_board_title'], pun_link($pun_url['index'])), array(sprintf($lang_profile['Users profile'], $user['username'], $lang_profile['Section about']), pun_link($pun_url['profile_about'], $id)), $lang_profile['Change password'] ); ($hook = get_hook('pf_change_pass_key_pre_header_load')) ? eval($hook) : null; define('PUN_PAGE', 'profile-changepass'); require PUN_ROOT.'header.php'; ?>
'.$lang_common['Required'].'') ?>
'.$lang_common['Required'].'') ?>
'.$lang_profile['E-mail info'].'
'; // Setup breadcrumbs $pun_page['crumbs'] = array( array($pun_config['o_board_title'], pun_link($pun_url['index'])), array(sprintf($lang_profile['Users profile'], $user['username'], $lang_profile['Section about']), pun_link($pun_url['profile_about'], $id)), $lang_profile['Change e-mail'] ); ($hook = get_hook('pf_change_email_normal_pre_header_load')) ? eval($hook) : null; define('PUN_PAGE', 'profile-changemail'); require PUN_ROOT.'header.php'; ?>'.$lang_common['Required'].'') ?>
'.$lang_common['Required'].'') ?>