<?php if ($fbaccountDetails->getLastname() || $fbaccountDetails->getFirstname()) { echo $fbaccountDetails->getLastname() . " " . $fbaccountDetails->getFirstname(); } else { echo "Facebook User"; } ?> </span> <span class="postPreviewDetails"> <?php echo lang("NOW"); ?> ยท <?php if ($fbaccount->UserFbAccountDefaultApp()) { echo Facebook::App($fbaccount->UserFbAccountDefaultApp())->app_name; } else { echo lang("APP_NAME"); } ?> </span> <div class="clear"></div> </div> <p class="message"><span class="defaultMessage"></span></p> <a href="#" class="previewPostLink"> <div class="previewLink"></div> <div class="postDetails"> <p class="name"> <span class="defaultName"></span> </p>
$validation = $validate->check($_POST, array('postInterval' => array('disp_text' => lang('POST_INTERVAL'), 'required' => true), 'language' => array('disp_text' => lang('LANGUAGE'), 'required' => true, 'inArray' => Language::GetAvailableLangs()))); if (Input::Get("email") != $user->data()->email) { $validation = $validate->check($_POST, array('email' => array('disp_text' => lang('EMAIL'), 'required' => true, 'unique' => 'users', 'valid_email' => true))); } if (Input::Get("password")) { $validation = $validate->check($_POST, array('password' => array('disp_text' => lang('PASSWORD'), 'min' => '6', 'max' => '32'), 'repassword' => array('disp_text' => lang('RE_ENTER_PASSWORD'), 'required' => true, 'matches' => 'password'))); } if ($validation->passed()) { try { $db = DB::GetInstance(); $openGroupOnly = Input::Get("openGroupOnly") == "on" ? 1 : 0; $uniquePost = Input::Get("uniquePost") == "on" ? 1 : 0; $uniqueLink = Input::Get("uniqueLink") == "on" ? 1 : 0; $user->UpdateOptions(array('postInterval' => Input::Get("postInterval"), 'openGroupOnly' => $openGroupOnly, 'lang' => Input::Get("language"), 'uniquePost' => $uniquePost, 'uniqueLink' => $uniqueLink, 'timezone' => Input::Get("timezone"))); // Update the default app for the current facebook account if ($fb->App(Input::Get('postApp'))) { $fbaccount->updateDefaultApp(Input::Get('postApp')); } // User must have admin permission to update the general settings if ($user->HasPermission("admin")) { Options::Update(array("users_can_register" => Input::Get("usersCanRegister") == "on" ? 1 : 0, "users_must_confirm_email" => Input::Get("usersMustConfirmEmail") == "on" ? 1 : 0, "sitename" => Input::Get("sitename"))); } // Update email if (Input::Get("email")) { $user->update(array('email' => Input::get('email')), $user->data()->id); } // Update facebook user id if (Input::Get("fbuserid")) { $user->update(array('fbuserid' => Input::get('fbuserid')), $user->data()->id); } // Update password