本文整理匯總了PHP中Authenticate::validateAuthUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Authenticate::validateAuthUser方法的具體用法?PHP Authenticate::validateAuthUser怎麽用?PHP Authenticate::validateAuthUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Authenticate
的用法示例。
在下文中一共展示了Authenticate::validateAuthUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: define
if (!defined("IN_PERMALINK")) {
define("TRUE_PHP_SELF", $current_page);
define("START_PAGE", substr(preg_replace("#(&|\\?)(s_action=edit&shout_id=)([0-9]+)#s", "", TRUE_PHP_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "")), 1));
}
// Autenticate user
require_once CLASSES . "Authenticate.class.php";
// Log in user
if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) {
$auth = new Authenticate($_POST['user_name'], $_POST['user_pass'], isset($_POST['remember_me']) ? TRUE : FALSE);
$userdata = $auth->getUserData();
unset($auth, $_POST['user_name'], $_POST['user_pass']);
} elseif (isset($_GET['logout']) && $_GET['logout'] == "yes") {
$userdata = Authenticate::logOut();
redirect(BASEDIR . "index.php");
} else {
$userdata = Authenticate::validateAuthUser();
// ok userdata never add _1.
}
// User level, Admin Rights & User Group definitions
define("iGUEST", $userdata['user_level'] == 0 ? 1 : 0);
define("iMEMBER", $userdata['user_level'] >= 101 ? 1 : 0);
define("iADMIN", $userdata['user_level'] >= 102 ? 1 : 0);
define("iSUPERADMIN", $userdata['user_level'] == 103 ? 1 : 0);
define("iUSER", $userdata['user_level']);
define("iUSER_RIGHTS", $userdata['user_rights']);
define("iUSER_GROUPS", substr($userdata['user_groups'], 1));
// check multilang tables
function multilang_table($table)
{
$result = dbquery("SELECT mlt_rights FROM " . DB_LANGUAGE_TABLES . " WHERE mlt_rights='" . $table . "' AND mlt_status='1' LIMIT 0,1");
$rows = dbrows($result);