本文整理汇总了PHP中AuthUser::Authenticate方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthUser::Authenticate方法的具体用法?PHP AuthUser::Authenticate怎么用?PHP AuthUser::Authenticate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthUser
的用法示例。
在下文中一共展示了AuthUser::Authenticate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _
<?php
include '../app.php';
// import php files
$language = '';
if (session_id() == '') {
$authUser = new AuthUser(false);
// get auth user
$authUser->Authenticate('All');
$language = isset($authUser->Language) ? $authUser->Language : '';
}
if ($language == '') {
// set language to preferred language (HTTP_ACCEPT_LANGUAGE)
$supported = Utilities::GetSupportedLanguages('');
$language = Utilities::GetPreferredLanguage($supported);
}
Utilities::SetLanguage($language);
// set language
header('Content-type: text/javascript');
?>
var i18njsstrings = {
'bold_text':"<?php
echo _("Bold Text (select text first)");
?>
",
'italic_text':"<?php
echo _("Italicize Text (select text first)");
?>
",
'strike_text':"<?php
echo _("Strike Text (select text first)");
示例2: str_replace
<?php
include 'app.php';
// import php files
$authUser = new AuthUser();
// get auth user
$authUser->Authenticate('Admin');
Utilities::SetLanguage($authUser->Language);
// set language
?>
<!DOCTYPE html>
<html lang="<?php
print str_replace('_', '-', $authUser->Language);
?>
">
<head>
<title><?php
print _("Account");
?>
—<?php
print $authUser->SiteName;
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- include css -->
<?php
示例3: str_replace
<?php
include 'app.php';
// import php files
$authUser = new AuthUser();
// get auth user
$authUser->Authenticate('SuperAdmin');
Utilities::SetLanguage($authUser->Language);
// set language
?>
<!DOCTYPE html>
<html lang="<?php
print str_replace('_', '-', $authUser->Language);
?>
">
<head>
<title>Sites—<?php
print $authUser->SiteName;
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- include styles -->
<?php
include 'modules/css.php';
?>