Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 61... Línea 61...
61
     * Constructor.
61
     * Constructor.
62
     */
62
     */
63
    public function __construct() {
63
    public function __construct() {
64
        $this->authtype = 'oauth2';
64
        $this->authtype = 'oauth2';
65
        $this->config = get_config('auth_oauth2');
65
        $this->config = get_config('auth_oauth2');
66
        $this->customfields = $this->get_custom_user_profile_fields();
-
 
67
    }
66
    }
Línea 68... Línea 67...
68
 
67
 
69
    /**
68
    /**
70
     * Returns true if the username and password work or don't exist and false
69
     * Returns true if the username and password work or don't exist and false
Línea 308... Línea 307...
308
        // up the user data of other users that use different authentication mechanisms (e.g. linked logins).
307
        // up the user data of other users that use different authentication mechanisms (e.g. linked logins).
309
        if ($userdata->auth !== $this->authtype) {
308
        if ($userdata->auth !== $this->authtype) {
310
            return $userdata;
309
            return $userdata;
311
        }
310
        }
Línea 312... Línea 311...
312
 
311
 
Línea 313... Línea 312...
313
        $allfields = array_merge($this->userfields, $this->customfields);
312
        $allfields = array_merge($this->userfields, $this->get_custom_user_profile_fields());
314
 
313
 
315
        // Go through each field from the external data.
314
        // Go through each field from the external data.
316
        foreach ($externaldata as $fieldname => $value) {
315
        foreach ($externaldata as $fieldname => $value) {