Esempio n. 1
0
$errors = array();
if (isset($_POST['update_profile'])) {
    $userInput = new UserFieldsInput();
    $userInput->setUserNameChange($settings['userNameChange']);
    $userInput->verifyNewEmail = true;
    $userInput->userData = $userdata;
    $userInput->saveUpdate();
    $userInput->displayMessages();
    $errors = $userInput->getErrorsArray();
    if (empty($errors) && $userInput->themeChanged()) {
        redirect(FUSION_SELF);
    }
    $userdata = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $userdata['user_id'] . "'"));
    unset($userInput);
} elseif (isset($_GET['code']) && $settings['email_verification'] == "1") {
    $userInput = new UserFieldsInput();
    $userInput->verifyCode($_GET['code']);
    $userInput->displayMessages();
    $userdata = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $userdata['user_id'] . "'"));
    unset($userInput);
}
opentable($locale['u102']);
if ($settings['email_verification'] == "1") {
    $result = dbquery("SELECT user_email FROM " . DB_EMAIL_VERIFY . " WHERE user_id='" . $userdata['user_id'] . "'");
    if (dbrows($result)) {
        $data = dbarray($result);
        echo "<div class='tbl2' style='text-align:center; width:500px; margin: 5px auto 10px auto;'>" . sprintf($locale['u200'], $data['user_email']) . "\n<br />\n" . $locale['u201'] . "\n</div>\n";
    }
}
echo "<div style='text-align:center; margin-bottom: 10px;'>" . $locale['u100'] . "</div>";
$userFields = new UserFields();
Esempio n. 2
0
    opentable($locale['u104'] . " " . $user_data['user_name']);
    $userFields = new UserFields();
    $userFields->userData = $user_data;
    $userFields->displayOutput();
    closetable();
    // Edit User Profile
} elseif (isset($_GET['step']) && $_GET['step'] == "edit" && $user_id && (!$isAdmin || iSUPERADMIN)) {
    require_once CLASSES . "UserFields.class.php";
    require_once CLASSES . "UserFieldsInput.class.php";
    $user_data = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $user_id . "'"));
    if (!$user_data || $user_data['user_level'] == 103) {
        redirect(FUSION_SELF . $aidlink);
    }
    $errors = array();
    if (isset($_POST['savechanges'])) {
        $userInput = new UserFieldsInput();
        $userInput->userData = $user_data;
        $userInput->adminActivation = 0;
        $userInput->emailVerification = 0;
        $userInput->isAdminPanel = TRUE;
        $userInput->skipCurrentPass = TRUE;
        $userInput->saveUpdate();
        $userInput->displayMessages();
        $errors = $userInput->getErrorsArray();
        $user_data = dbarray(dbquery("SELECT * FROM " . DB_USERS . " WHERE user_id='" . $user_id . "'"));
        unset($userInput);
    }
    opentable($locale['430']);
    member_nav(member_url("edit", $user_id) . "| " . $locale['430']);
    $userFields = new UserFields();
    $userFields->postName = "savechanges";