[ Index ] |
|
Code source de Claroline 188 |
1 <?php // $Id: lcs.inc.php.dist,v 1.1.4.1 2007/07/04 12:57:44 mathieu Exp $ 2 if ( count( get_included_files() ) == 1 ) die( '---' ); 3 /** 4 * CLAROLINE 5 * 6 * @version 1.8 $Revision: 1.1.4.1 $ 7 * 8 * @copyright (c) 2001-2006 Universite catholique de Louvain (UCL) 9 * 10 * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE 11 * 12 * @package CLAUTH 13 * 14 * @author Claro Team <cvs@claroline.net> 15 */ 16 17 18 // Define the Auth driver options 19 20 $authSourceName = 'lcs'; 21 $authSourceType = 'LDAP'; 22 23 global $extAuthOptionList; 24 $extAuthOptionList = array( 25 'url' => "ldap://$ldap_server", 26 'port' => "$ldap_port", 27 'basedn' => "$ldap_base_dn", 28 'userattr' => 'uid', 29 'useroc' => 'People', 30 'attributes' => array('sn', 'givenName', 'telephoneNumber','mail'), 31 'attrformat' => 'AUTH_LDAP_ATTR_AUTH_STYLE', 32 'debug' => false 33 ); 34 35 // Link external authentication attributes to the Claroline user attribute. 36 // The keys are the claroline attributes and the value are the authentication 37 // external attributes. 38 // 39 // Note. If the attribute isn't found in the external authentication results, 40 // the external attribute NAME would be record as claroline attribute VALUE 41 // user table. It means that you can substitute a default value to the attribute 42 // name. 43 44 $extAuthAttribNameList = array ( 45 'lastname' => 'sn', 46 'firstname' => 'givenName', 47 'email' => 'mail', 48 'phoneNumber' => 'telephoneNumber', 49 'authSource' => 'ldap', 50 ); 51 52 53 54 // Array setting optionnal preliminary treatment to the data retrieved from the 55 // exernal authentication source. The array keys are the concernend claroline 56 // user table fields, ans the values are the name of the function which make 57 // the treatment You can use standart PHP functions or functions defined by 58 // your own. If no function named like the value are found, the authentication 59 // system will simply stored thisvalue into Claroline. 60 61 $extAuthAttribTreatmentList = array ( 62 'lastname' => 'ldap_to_claroline', 63 'firstname' => 'ldap_to_claroline', 64 'loginName' => 'ldap_to_claroline', 65 'email' => 'ldap_to_claroline', 66 'officialCode' => 'ldap_to_claroline', 67 'phoneNumber' => 'ldap_to_claroline', 68 'isCourseCreator' => NULL 69 ); 70 71 72 function ldap_to_claroline($attribute) 73 { 74 if ( is_array( $attribute ) ) $attribute = implode(', ', $attribute); 75 return utf8_decode($attribute); 76 } 77 78 // PROCESS AUTHENTICATION 79 80 return require dirname(__FILE__).'/lcsProcess.inc.php'; 81 82 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 14:38:42 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |