当前位置: 首页>>代码示例>>PHP>>正文


PHP jAcl2::clearCache方法代码示例

本文整理汇总了PHP中jAcl2::clearCache方法的典型用法代码示例。如果您正苦于以下问题:PHP jAcl2::clearCache方法的具体用法?PHP jAcl2::clearCache怎么用?PHP jAcl2::clearCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jAcl2的用法示例。


在下文中一共展示了jAcl2::clearCache方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onAuthLogout

 function onAuthLogout($event)
 {
     try {
         jAcl2::clearCache();
     } catch (Exception $e) {
     }
 }
开发者ID:hadrienl,项目名称:jelix,代码行数:7,代码来源:jacl2db.listener.php

示例2: setRightsOnForum

 /**
  * set rights on the given forum
  * @param integer $group the group id.
  * @param array $rights list of rights key = subject, value = true
  * @param string $resource the resource corresponding to the "forum" string + id_forum
  */
 public static function setRightsOnForum($group, $rights, $resource)
 {
     $dao = jDao::get('jacl2db~jacl2rights', jAcl2Db::getProfile());
     $dao->deleteHfnuByGroup($group, $resource);
     foreach ($rights as $sbj => $val) {
         if ($val != '') {
             jAcl2DbManager::addRight($group, $sbj, $resource);
         }
     }
     jAcl2::clearCache();
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:17,代码来源:hfnuadminrights.class.php

示例3: logout

 /**
  * logout a user and delete the user in the php session
  */
 public static function logout()
 {
     $config = self::_getConfig();
     jEvent::notify('AuthLogout', array('login' => $_SESSION[$config['session_name']]->login));
     $_SESSION[$config['session_name']] = new jAuthDummyUser();
     try {
         jAcl::clearCache();
     } catch (Exception $e) {
     }
     try {
         jAcl2::clearCache();
     } catch (Exception $e) {
     }
     if (isset($config['persistant_enable']) && $config['persistant_enable']) {
         if (!isset($config['persistant_cookie_name'])) {
             throw new jException('jelix~auth.error.persistant.incorrectconfig', 'persistant_cookie_name, persistant_crypt_key');
         }
         setcookie($config['persistant_cookie_name'] . '[auth]', '', time() - 3600, $config['persistant_cookie_path']);
     }
 }
开发者ID:Calmacil,项目名称:ffdvh,代码行数:23,代码来源:jAuth.class.php

示例4: removeSubject

 /**
  * Delete the given subject
  * @param string  $subject the key of the subject
  */
 public static function removeSubject($subject)
 {
     $p = jAcl2Db::getProfile();
     jDao::get('jelix~jacl2rights', $p)->deleteBySubject($subject);
     jDao::get('jelix~jacl2subject', $p)->delete($subject);
     jAcl2::clearCache();
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:11,代码来源:jAcl2DbManager.class.php

示例5: removeSubjectGroup

 /**
  * Delete the given subject
  * @param string  $subjectGroup the key of the subject group
  * @since 1.3
  */
 public static function removeSubjectGroup($subjectGroup)
 {
     jDao::get('jacl2db~jacl2subject', 'jacl2_profile')->removeSubjectFromGroup($subjectGroup);
     jDao::get('jacl2db~jacl2subjectgroup', 'jacl2_profile')->delete($subjectGroup);
     jAcl2::clearCache();
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:11,代码来源:jAcl2DbManager.class.php

示例6: testGetRightDisconnect

 public function testGetRightDisconnect()
 {
     jAuth::logout();
     jAcl2::clearCache();
     $this->assertFalse(jAcl2::check('super.cms.list'));
     $this->assertFalse(jAcl2::check('admin.access'));
     jAcl2::clearCache();
     jAcl2DbManager::addRight('__anonymous', 'super.cms.list');
     $this->assertTrue(jAcl2::check('super.cms.list'));
     $this->assertFalse(jAcl2::check('admin.access'));
     jAcl2::clearCache();
 }
开发者ID:hadrienl,项目名称:jelix,代码行数:12,代码来源:jacl2.main_api.html_cli.php


注:本文中的jAcl2::clearCache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。