[Phpmyadmin-devel] User loggedin status

Marc Delisle marc at infomarc.info
Sun Aug 31 22:22:55 CEST 2014


Le 2014-08-31 15:43, Smita a écrit :
> *typo : very => very basic
> 
> 
> On Mon, Sep 1, 2014 at 1:11 AM, Smita <kumarismita62 at gmail.com
> <mailto:kumarismita62 at gmail.com>> wrote:
> 
>     Hi,
> 
>     I know its a very question to ask anyway Is there an elegant way in
>     client side(functions.js) I can check if any user is currently
>     loggedin or not ? Or if we can check the current page is login page
>     or some other page ?
> 
>     Basically I want to add a script that should be executed only after
>     user is loggedin and should be accessible to all other pages except
>     login page so any hint on where can I add that script ?
>     I am trying my hands on the feature request #1529[0].
> 
>     [0] https://sourceforge.net/p/phpmyadmin/feature-requests/1529/
> 
>     Thanks and Regards
>     - Smita

Hi Smita,

We can summarize the whole "being logged in" state this way: this is
something that happens at the PHP level (in
libraries/DatabaseInterface.class.php, the connect() function) and
results into setting $GLOBALS['userlink'].

I don't think we have anything at the js level; maybe you can add a
parameter identifying this state.

Have a look at https://wiki.phpmyadmin.net/pma/Page_loader. In
getJsParams(), you can verify whether or not $GLOBALS['userlink'] is
set, and define a logged_in parameter.

-- 
Marc Delisle | phpMyAdmin




More information about the Developers mailing list