[Solved] JFactory::getUser : data stays in cache ? - Joomla! Forum - community, help and support


hello ;)

first, sorry english :-[

i'm building customized form called iframe link.

in form, i'm getting information connected user. informations seems in cache. if user disconnects, still can see informations in form

here code :

code: select all

<html>
   <body>
      <head>
         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
         <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="expires" content="0">
      </head>

      <?php

      define( '_jexec', 1 );
      define( 'jpath_base', realpath(dirname(__file__).'/../..' ));
      define( 'ds', directory_separator );
      
      require_once ( jpath_base .ds.'includes'.ds.'defines.php' );
      require_once ( jpath_base .ds.'includes'.ds.'framework.php' );
      $mainframe =& jfactory::getapplication('site');
      $mainframe->initialise();

      $user = jfactory::getuser();
      $newuserid = $user->id;
      
      echo $user->username;

      ?>

      
   </body>
</html>


the line echo $user->username; displays username, after being disconnected. vice versa, if open form without being connected, , login user : "echo" command doesn't return anything. need clean explorer cache make work.

thank you :)

regards,
olivier

what $user->guest return?





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support