當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserUtil::getAccountSetting方法代碼示例

本文整理匯總了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 
開發者ID:AxelPanda,項目名稱:ibos,代碼行數:31,代碼來源:main.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);
     }
 }
開發者ID:AxelPanda,項目名稱:ibos,代碼行數:29,代碼來源:DefaultController.php


注:本文中的UserUtil::getAccountSetting方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。