[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/auth/nologin/ -> auth.php (source)

   1  <?php
   2  
   3  /**
   4   * @author Petr Skoda
   5   * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
   6   * @package moodle multiauth
   7   *
   8   * Authentication Plugin: No Authentication
   9   *
  10   * No authentication at all. This method approves everything!
  11   *
  12   * 2007-02-18  File created.
  13   */
  14  
  15  if (!defined('MOODLE_INTERNAL')) {
  16      die('Direct access to this script is forbidden.');    ///  It must be included from a Moodle page
  17  }
  18  
  19  require_once($CFG->libdir.'/authlib.php');
  20  
  21  /**
  22   * Plugin for no authentication - disabled user.
  23   */
  24  class auth_plugin_nologin extends auth_plugin_base {
  25  
  26  
  27      /**
  28       * Constructor.
  29       */
  30      function auth_plugin_nologin() {
  31          $this->authtype = 'nologin';
  32      }
  33  
  34      /**
  35       * Do not allow any login.
  36       *
  37       */
  38      function user_login($username, $password) {
  39          return false;
  40      }
  41  
  42      /**
  43       * No password updates.
  44       */
  45      function user_update_password($user, $newpassword) {
  46          return false;
  47      }
  48  
  49      /**
  50       * No external data sync.
  51       *
  52       * @return bool
  53       */
  54      function is_internal() {
  55          //we do not know if it was internal or external originally
  56          return true;
  57      }
  58  
  59      /**
  60       * No changing of password.
  61       *
  62       * @return bool
  63       */
  64      function can_change_password() {
  65          return false;
  66      }
  67  
  68      /**
  69       * No password resetting.
  70       */
  71      function can_reset_password() {
  72          return false;
  73      }
  74  
  75  }
  76  
  77  ?>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7