本文整理汇总了PHP中PMF_User_CurrentUser::getFromCookie方法的典型用法代码示例。如果您正苦于以下问题:PHP PMF_User_CurrentUser::getFromCookie方法的具体用法?PHP PMF_User_CurrentUser::getFromCookie怎么用?PHP PMF_User_CurrentUser::getFromCookie使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMF_User_CurrentUser
的用法示例。
在下文中一共展示了PMF_User_CurrentUser::getFromCookie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMF_Language
* Initialize attachment factory
*/
PMF_Attachment_Factory::init($faqConfig->get('records.attachmentsStorageType'), $faqConfig->get('records.defaultAttachmentEncKey'), $faqConfig->get('records.enableAttachmentEncryption'));
$currentSave = PMF_Filter::filterInput(INPUT_POST, 'save', FILTER_SANITIZE_STRING);
$currentAction = PMF_Filter::filterInput(INPUT_GET, 'action', FILTER_SANITIZE_STRING);
$currentToken = PMF_Filter::filterInput(INPUT_POST, 'csrf', FILTER_SANITIZE_STRING);
$Language = new PMF_Language($faqConfig);
$LANGCODE = $Language->setLanguage($faqConfig->get('main.languageDetection'), $faqConfig->get('main.language'));
require_once PMF_ROOT_DIR . '/lang/language_en.php';
if (isset($LANGCODE) && PMF_Language::isASupportedLanguage($LANGCODE)) {
require_once PMF_ROOT_DIR . '/lang/language_' . $LANGCODE . '.php';
} else {
$LANGCODE = 'en';
}
$auth = false;
$user = PMF_User_CurrentUser::getFromCookie($faqConfig);
if (!$user instanceof PMF_User_CurrentUser) {
$user = PMF_User_CurrentUser::getFromSession($faqConfig);
}
if ($user) {
$auth = true;
} else {
$error = $PMF_LANG['ad_auth_sess'];
$user = null;
unset($user);
}
//
// Get current user rights
//
$permission = array();
if ($auth === true) {