Actually you don't even need to do that.
$wgUser->isLoggedIn(); will tell you if you're logged in.
And $wgOut->redirect( SpecialPage::getTitleFor( 'Special:UserLogin'
)->fullURL() );
should direct to the login page (Though I may have a function name or
two wrong.)
~Daniel Friesen(Dantman) of:
-The Gaiapedia (
I am notorious for over complicating things, but you
could have it
check if the user is logged-in, and if not, redirect them to a login
page, and if they are, let them brows as usual.
You would probably need to do this in php at the level of the skin
something like this at the very top of the skin template should work
The name of the user cookie is different for each install, so you
would need to find the name and enter it in.
if(!isset($_COOKIE['name_of_user_cookie'])){ // if cookie not set -
redirect
header("Location:
http://www.example.com/index.php/
Special:Userlogin"); // Redirects browser to login page
}
On Mar 31, 2008, at 12:11 PM, for.register for.register wrote:
On Tue, Apr 1, 2008 at 12:05 AM, for.register
for.register
<fregister(a)gmail.com> wrote:
On Mon, Mar 31, 2008 at 11:56 PM, for.register
for.register
<fregister(a)gmail.com> wrote:
On Mon, Mar 31, 2008 at 11:21 PM, Schneelocke
<schneelocke(a)gmail.com> wrote:
> 2008/3/31, for.register for.register <fregister(a)gmail.com>om>:
>
>
>> I am a new user of mediawiki, my wiki is a private wiki, only
>> authentic user is allowed. My question is how to set the homepage
>> directly to login window.
>>
> Have you tried putting '#REDIRECT [[Special:Userlogin]]' on your
> main
> page? Alternatively, you could probably also edit
> MediaWiki:Mainpage
> and put 'Special:Userlogin' in there.
>
> I haven't tried either method, though.
>
> --
> schnee
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l(a)lists.wikimedia.org
>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
Thanks, but frankly I do not know where is my Mainpage, I use
default
index.php.
Could you explain a little more?
I got it. on MediaWiki:Mainpage 'Special:Userlogin' works good.
Thank you!
The only problem with this method (changing Mediawiki:Mainpage) is
once a
user logs in they are taken back to the Special:UserLogin page, not
the Main
Page. Is there anyway to accomplish this and redirect back to the
Main Page?
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l