本文整理匯總了PHP中Current_User::verifySaltedUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Current_User::verifySaltedUrl方法的具體用法?PHP Current_User::verifySaltedUrl怎麽用?PHP Current_User::verifySaltedUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Current_User
的用法示例。
在下文中一共展示了Current_User::verifySaltedUrl方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: admin
public function admin()
{
/**
* Folder permissions needed
*/
switch ($_REQUEST['fop']) {
case 'open_file_manager':
if (!Current_User::verifySaltedUrl()) {
javascript('close_refresh');
Layout::nakedDisplay();
}
return $this->openFileManager();
break;
case 'fm_folders':
return $this->folderView();
break;
case 'fm_fld_contents':
return $this->folderContentView();
break;
case 'pick_file':
$this->pickFile();
break;
case 'resize_pick':
$this->resizePick();
break;
}
}
示例2: secured
/**
* Works like authorized, but checks for a salted authkey
* Won't work on posts yet.
*/
public static function secured($module, $subpermission = null, $item_id = 0, $itemname = null, $unrestricted_only = false)
{
if ($unrestricted_only && Current_User::isRestricted($module)) {
return false;
}
if (!isset($_SESSION['User'])) {
return false;
}
return Current_User::verifySaltedUrl() && $_SESSION['User']->allow($module, $subpermission, $item_id, $itemname);
}