예제 #1
0
 public function ACT_dologout()
 {
     MDL_User_Auth::logout();
     $this->locator->redirect('passport_login');
 }
예제 #2
0
파일: Edit.php 프로젝트: thezawad/vakuum
 public static function validate($user_name, $validation_code)
 {
     $user = MDL_User_Detail::getUserByName($user_name);
     if ($user['identity'] != 'unvalidated' || !isset($user['validation_code'])) {
         throw new MDL_Exception_User(MDL_Exception_User::UNVALIDATED_USER);
     }
     if ($user['validation_code'] == $validation_code) {
         $user_meta = new MDL_User_Meta($user['user_id']);
         $user_meta->setVar('identity', 'general');
         $user_meta->unsetVar('validation_code');
         MDL_User_Auth::logout();
         MDL_ACL::getInstance()->setUser(new MDL_User($rs['user_id']));
     }
 }
예제 #3
0
BFL_Loader::setControllerPath('./library/application/controller/');
BFL_Loader::setModelPath('./library/application/model/');
//初始化計時器
BFL_Timer::initialize();
//設置運行時全局變量
BFL_Register::setVar('password_encode_word', PWD_ENCWORD);
BFL_Register::setVar('db_info', getDBInfo());
//初始化數據庫事務處理
$db = BFL_Database::getInstance();
$db->beginTransaction();
//初始化參數表
$config = MDL_Config::getInstance();
//設置全局異常捕捉函數
set_exception_handler(array('MDL_GlobalControl', 'exceptionHandler'));
//設置退出回調函數
register_shutdown_function(array('MDL_GlobalControl', 'shutdownHandler'));
//檢查地址綁定
$bind_address = $config->getVar('site_address');
if ($bind_address != '' && $bind_address != BFL_General::getServerAddress()) {
    BFL_Controller::redirect($bind_address);
}
//初始化用戶會話
MDL_ACL::getInstance()->initialize(SESSION_PREFIX, 'guest');
MDL_User_Auth::getLoginedUserInformation();
//加載插件
MDL_Plugin::load_plugins(MDL_Locator::getInstance()->getFilePath('plugins'));
//初始化前端控制器
$controller = BFL_Controller::getInstance();
$controller->setCustomControllerRouter('/admin', '_admin');
$controller->setNotFound(array('CTL_error', 'notFound'));
$controller->dispatch();