<div dir="ltr">On Mon, Sep 1, 2014 at 1:52 AM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 2014-08-31 15:43, Smita a écrit :<br>
<div class="">> *typo : very => very basic<br>
><br>
><br>
> On Mon, Sep 1, 2014 at 1:11 AM, Smita <<a href="mailto:kumarismita62@gmail.com">kumarismita62@gmail.com</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:kumarismita62@gmail.com">kumarismita62@gmail.com</a>>> wrote:<br>
><br>
> Hi,<br>
><br>
> I know its a very question to ask anyway Is there an elegant way in<br>
> client side(functions.js) I can check if any user is currently<br>
> loggedin or not ? Or if we can check the current page is login page<br>
> or some other page ?<br>
><br>
> Basically I want to add a script that should be executed only after<br>
> user is loggedin and should be accessible to all other pages except<br>
> login page so any hint on where can I add that script ?<br>
> I am trying my hands on the feature request #1529[0].<br>
><br>
> [0] <a href="https://sourceforge.net/p/phpmyadmin/feature-requests/1529/" target="_blank">https://sourceforge.net/p/phpmyadmin/feature-requests/1529/</a><br>
><br>
> Thanks and Regards<br>
> - Smita<br>
<br>
</div></div>Hi Smita,<br>
<br>
We can summarize the whole "being logged in" state this way: this is<br>
something that happens at the PHP level (in<br>
libraries/DatabaseInterface.class.php, the connect() function) and<br>
results into setting $GLOBALS['userlink'].<br>
<br>
I don't think we have anything at the js level; maybe you can add a<br>
parameter identifying this state.<br>
<br>
Have a look at <a href="https://wiki.phpmyadmin.net/pma/Page_loader" target="_blank">https://wiki.phpmyadmin.net/pma/Page_loader</a>. In<br>
getJsParams(), you can verify whether or not $GLOBALS['userlink'] is<br>
set, and define a logged_in parameter.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>Hi Marc,<br><br></div><div>Thanks. Yes adding a logged_in parameter worked.<br><br>--<br></div><div>Smita <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">
--<br>
Marc Delisle | phpMyAdmin<br>
<br>
------------------------------------------------------------------------------<br>
Slashdot TV.<br>
Video for Nerds. Stuff that matters.<br>
<a href="http://tv.slashdot.org/" target="_blank">http://tv.slashdot.org/</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</font></span></blockquote></div><br></div></div>