[Mediawiki-l] Where is the "are they logged in" code located?
john.straffin at duke.edu
Fri Feb 18 14:57:19 UTC 2005
Brion Vibber wrote:
> John Straffin wrote:
> > I've looked at Thoams Gries' flowchart and perused index.php, setup.php,
> > user.php and I can't find where MW actually says "are they logged in?"
> > Anyone wanna throw me a bone? Thanks in advance...
> User::loadFromSession() checks several sources for login credentials,
> returning either the authenticated User or a generic anonymous User object.
Okay... so, as I understand it, User::loadFromSession() basically says:
"If there's a session, then do some stuff, otherwise if there's a cookie,
then do some stuff, otherwise return a new user object."
Instead of saying "return a new user object" above, I want to say "log in
as <?= _SERVER["REMOTE_USER"] ?>". Should I be looking for the "log in"
function in SpecialUserlogin.php?
(also, on a side note, how does the User::loadFromSession() function get
beyond the initial block of code? It appears that all of the options of the
first "if, else if, else" end up with a "return"...)
(and, on a completely unrelated note, lines 23 - 25 of Index.php state:
require_once( './includes/Defines.php' );
require_once( './LocalSettings.php' );
require_once( 'includes/Setup.php' );
Shouldn't line 25 look like 23 & 24 (i.e. './x' vs 'x'), if not just for
John Straffin -+- Duke Univ OIT Tech Support -+- john.straffin at duke.edu
More information about the MediaWiki-l