[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/ -> login_anon.php (source)

   1  <?php
   2  # MantisBT - A PHP based bugtracking system
   3  
   4  # MantisBT is free software: you can redistribute it and/or modify
   5  # it under the terms of the GNU General Public License as published by
   6  # the Free Software Foundation, either version 2 of the License, or
   7  # (at your option) any later version.
   8  #
   9  # MantisBT is distributed in the hope that it will be useful,
  10  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  # GNU General Public License for more details.
  13  #
  14  # You should have received a copy of the GNU General Public License
  15  # along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * login_anon.php logs a user in anonymously without having to enter a username
  19   * or password.
  20   *
  21   * Depends on two global configuration variables:
  22   * allow_anonymous_login - bool which must be true to allow anonymous login.
  23   * anonymous_account - name of account to login with.
  24   *
  25   * TODO:
  26   * Check how manage account is impacted.
  27   * Might be extended to allow redirects for bug links etc.
  28   *
  29   * @package MantisBT
  30   * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
  31   * @copyright Copyright (C) 2002 - 2011  MantisBT Team - mantisbt-dev@lists.sourceforge.net
  32   * @link http://www.mantisbt.org
  33   *
  34   * @uses core.php
  35   * @uses config_api.php
  36   * @uses gpc_api.php
  37   * @uses print_api.php
  38   * @uses string_api.php
  39   */
  40  
  41  /**
  42   * MantisBT Core API's
  43   */
  44  require_once ( 'core.php' );
  45  require_api( 'config_api.php' );
  46  require_api( 'gpc_api.php' );
  47  require_api( 'print_api.php' );
  48  require_api( 'string_api.php' );
  49  
  50  $f_return = gpc_get_string( 'return', '' );
  51  
  52  $t_anonymous_account = config_get( 'anonymous_account' );
  53  
  54  if ( $f_return !== '' ) {
  55      $t_return = string_url( string_sanitize_url( $f_return ) );
  56      print_header_redirect( "login.php?username=$t_anonymous_account&perm_login=false&return=$t_return" );
  57  } else {
  58      print_header_redirect( "login.php?username=$t_anonymous_account&perm_login=false" );
  59  }


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7