FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Proposed code change to add AUTO_LOGIN plugin hook
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Proposed code change to add AUTO_LOGIN plugin hook [message #184657 is a reply to message #184656] Tue, 14 January 2014 17:43 Go to previous messageGo to previous message
kmoradha is currently offline  kmoradha
Messages: 8
Registered: January 2014
Karma:
Junior Member
Just to be sure, here's how I interpret that:

--- users.inc.t-orig    2014-01-14 11:08:47.608988091 -0500
+++ users.inc.t 2014-01-14 12:42:28.902660593 -0500
@@ -654,7 +654,12 @@

        $sq = 0;
        /* Fetch an object with the user's session, profile & theme info. */
-       if (!($u = ses_get())) {
+       if (!($u = ses_get()) && defined('plugins')) {
+               /* Call auto-login plugins. */
+               $u = plugin_call_hook('AUTO_LOGIN');
+       }
+
+       if (!$u) {
                /* New anon user. */
                $u = ses_anon_make();
        } else if ($u->id != 1 && (!$GLOBALS['is_post'] || sq_check(1, $u->sq, $u->id, $u->ses_id))) {
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Proposed code change for potentially more unique sysid
Next Topic: How to use Search plugin hook
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Apr 27 05:57:25 GMT 2024

Total time taken to generate the page: 0.04870 seconds