Skip to content
Snippets Groups Projects
Select Git revision
  • 2d291d35f659b8ed6d3ac9e1935dcd306567879e
  • master default protected
  • pymilter-1.0.4
  • pymilter-1.0.3
  • pymilter-1.0.2
  • pymilter-1.0.1
  • pymilter-1_0
  • milter-0_8_18
  • pymilter-0_9_8
  • pymilter-0_9_7
  • pymilter-0_9_6
  • pymilter-0_9_5
  • pymilter-0_9_4
  • pymilter-0_9_2
  • pymilter-0_9_1
  • pymilter-0_9_0
  • pymilter-0_8_12
  • pymilter-0_8_11
  • pymilter-0_8_10
  • pymilter-0_8_9
  • milter-0_8_8
  • milter-0_8_7
22 results

setup.py

Blame
  • auth.php 28.63 KiB
    <?php
    // This file is part of Moodle - http://moodle.org/
    //
    // Moodle is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // Moodle is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
    
    /**
     * Auth plugin "LDAP SyncPlus"
     *
     * @package    auth_ldap_syncplus
     * @copyright  2014 Alexander Bias, Ulm University <alexander.bias@uni-ulm.de>
     * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
    
    defined('MOODLE_INTERNAL') || die;
    
    // @codingStandardsIgnoreFile
    // Let codechecker ignore this file. This code mostly re-used from auth_ldap and the problems are already there and not made by us.
    
    global $CFG;
    
    require_once($CFG->libdir.'/authlib.php');
    require_once($CFG->libdir.'/ldaplib.php');
    require_once($CFG->dirroot.'/user/lib.php');
    require_once($CFG->dirroot.'/auth/ldap/locallib.php');
    require_once(__DIR__.'/../ldap/auth.php');
    require_once(__DIR__.'/locallib.php');
    
    /**
     * Auth plugin "LDAP SyncPlus" - Auth class
     *
     * @package    auth_ldap_syncplus
     * @copyright  2014 Alexander Bias, Ulm University <alexander.bias@uni-ulm.de>
     * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
    class auth_plugin_ldap_syncplus extends auth_plugin_ldap {
    
        /**
         * Constructor with initialisation.
         */
        public function __construct() {
            $this->authtype = 'ldap_syncplus';
            $this->roleauth = 'auth_ldap';
            $this->errorlogtag = '[AUTH LDAP SYNCPLUS] ';
            $this->init_plugin($this->authtype);
        }
    
        /**
         * Old syntax of class constructor. Deprecated in PHP7.
         *
         * @deprecated since Moodle 3.1
         */
        public function auth_plugin_ldap_syncplus() {
            debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
            self::__construct();
        }
    
    
        /**
         * Syncronizes user fron external LDAP server to moodle user table