bin/logon
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 #!/usr/bin/perl
       
     2 sub BEGIN { $ENV{PTKDB_STOP_TAG_COLOR} = "yellow" } 
       
     3 #
       
     4 # TWiki Enterprise Collaboration Platform, http://TWiki.org/
       
     5 #
       
     6 # Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org
       
     7 # and TWiki Contributors.
       
     8 #
       
     9 # For licensing info read LICENSE file in the TWiki root.
       
    10 # This program is free software; you can redistribute it and/or
       
    11 # modify it under the terms of the GNU General Public License
       
    12 # as published by the Free Software Foundation; either version 2
       
    13 # of the License, or (at your option) any later version.
       
    14 #
       
    15 # This program is distributed in the hope that it will be useful,
       
    16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    18 # GNU General Public License for more details, published at
       
    19 # http://www.gnu.org/copyleft/gpl.html
       
    20 #
       
    21 # As per the GPL, removal of this notice is prohibited.
       
    22 
       
    23 use CGI::Carp qw(fatalsToBrowser);
       
    24 use CGI;
       
    25 
       
    26 BEGIN {
       
    27     # Set default current working directory (needed for mod_perl)
       
    28     if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\/]+$/ ) {
       
    29         chdir $1;
       
    30     }
       
    31     # Set library paths in @INC, at compile time
       
    32     unshift @INC, '.';
       
    33     require 'setlib.cfg';
       
    34 }
       
    35 
       
    36 #lets use the same code as login...
       
    37 use TWiki::UI;
       
    38 
       
    39 TWiki::UI::run( \&logon );
       
    40 
       
    41 sub logon {
       
    42     my $session = shift;
       
    43     $session->{users}->{loginManager}->login( $session->{cgiQuery}, $session );
       
    44 }