Beispiel #1
0
 /**
  * Delete cache data of a user, must call this method in a post-edit or a post-complete actions
  *
  * @param $ckusid integer Identifier of user to delete cache data, if is not passed, the method get user logged
  *
  * @return void
  * @throws /Exception
  */
 public static function deleteCacheUser($ckusid = null)
 {
     try {
         Identity::getLogger()->debug('Delete cache of user');
         if ($ckusid == null) {
             if (Identity::getThings()->getLoginStatus() != null && Identity::getThings()->getLoginStatus()->getConnectState() == LoginStatusType::connected) {
                 FileCache::delete('user-' . Identity::getThings()->getLoginStatus()->getCkUsid());
             }
         } else {
             FileCache::delete('user-' . $ckusid);
         }
     } catch (Exception $e) {
         Identity::getLogger()->error($e->getMessage());
     }
     return null;
 }