On Mon, Sep 1, 2014 at 1:52 AM, Marc Delisle marc@infomarc.info wrote:
Le 2014-08-31 15:43, Smita a écrit :
*typo : very => very basic
On Mon, Sep 1, 2014 at 1:11 AM, Smita <kumarismita62@gmail.com mailto:kumarismita62@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.
Hi Marc,
Thanks. Yes adding a logged_in parameter worked.
-- Smita
-- Marc Delisle | phpMyAdmin
Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel