本文整理匯總了PHP中UserUtil::getAccountSetting方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserUtil::getAccountSetting方法的具體用法?PHP UserUtil::getAccountSetting怎麽用?PHP UserUtil::getAccountSetting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserUtil
的用法示例。
在下文中一共展示了UserUtil::getAccountSetting方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<link rel="stylesheet" href="<?php
echo STATICURL;
?>
/css/iefix.css?<?php
echo VERHASH;
?>
" />
<![endif]-->
<!-- load css end -->
<!-- JS全局變量-->
<script>
<?php
$gUploadConfig = AttachUtil::getUploadConfig();
$gAccount = UserUtil::getAccountSetting();
?>
var G = {
VERHASH: '<?php
echo VERHASH;
?>
',
SITE_URL: '<?php
echo Ibos::app()->setting->get("siteurl");
?>
',
STATIC_URL: '<?php
echo STATICURL;
?>
',
uid: '<?php
示例2: actionReset
public function actionReset()
{
if (Ibos::app()->user->isGuest) {
Ibos::app()->user->loginRequired();
}
if (EnvUtil::submitCheck("formhash")) {
$original = filter_input(INPUT_POST, "originalpass", FILTER_SANITIZE_SPECIAL_CHARS);
$new = filter_input(INPUT_POST, "newpass", FILTER_SANITIZE_SPECIAL_CHARS);
$newConfirm = filter_input(INPUT_POST, "newpass_confirm", FILTER_SANITIZE_SPECIAL_CHARS);
if ($original == "") {
$this->error(Ibos::lang("Original password require"));
} elseif (strcasecmp(md5(md5($original) . Ibos::app()->user->salt), Ibos::app()->user->password) !== 0) {
$this->error(Ibos::lang("Password is not correct"));
} else {
if (!empty($new) && strcasecmp($new, $newConfirm) !== 0) {
$this->error(Ibos::lang("Confirm password is not correct"));
} else {
$password = md5(md5($new) . Ibos::app()->user->salt);
$success = User::model()->updateByUid(Ibos::app()->user->uid, array("password" => $password, "lastchangepass" => TIMESTAMP));
$success && Ibos::app()->user->logout();
$this->success(Ibos::lang("Reset success"), $this->createUrl("default/login"));
}
}
} else {
$userName = Ibos::app()->user->realname;
$data = array("assetUrl" => $this->getAssetUrl("user"), "account" => UserUtil::getAccountSetting(), "lang" => Ibos::getLangSources(), "unit" => Ibos::app()->setting->get("setting/unit"), "user" => $userName);
$this->renderPartial("reset", $data);
}
}