Accessing session data outside Joomla

前端 未结 15 1336
小鲜肉
小鲜肉 2020-12-08 03:36

I am trying to run an application outside Joomla (not as a plugin) and I would like to access the logged in user\'s information (userid). I am wondering how should I go abou

相关标签:
15条回答
  • 2020-12-08 04:10

    apply this in mod_login.php

    After: $user =& JFactory::getUser();

    echo "<p>Your usertype is {$user->usertype} which has a group id of {$user->gid}.</p>";

    0 讨论(0)
  • 2020-12-08 04:11

    It might be helpful to see how such is achieved in application bridges like jFusion. I suggest at least a system plugin for Joomla, that will use joomla functions to get everything you need from the joomla install and shipto your application onApplicationInitialize. The most important issue will be ur data flow modelling!

    0 讨论(0)
  • 2020-12-08 04:12

    to get the user id you need to use Joomlas functions:

    $user =& JFactory::getUser();
    $user->get('id');

    will let you get the user ID. you will however need to do this inside of the joomla page so i dont know how usefult hat will be to you.

    0 讨论(0)
提交回复
热议问题