[ Index ] |
|
Code source de Claroline 188 |
1 <?php // $Id: ganesha.inc.php.dist,v 1.1.2.1 2007/04/10 13:30:18 mathieu Exp $ 2 if ( count( get_included_files() ) == 1 ) die( '---' ); 3 /** 4 * CLAROLINE 5 * 6 * @version 1.8 $Revision: 1.1.2.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 $authSourceName = 'ganesha'; 18 $authSourceType = 'DB'; 19 20 // Define the Auth driver options 21 22 $extAuthOptionList = array( 23 24 // PUT HERE THE CORRECT DSN FOR YOUR DB SYSTEM 25 'dsn' => 'mysql://dbuser:dbpassword@domain/ganesha', 26 27 'table' => 'membres', // warning ! table prefix can change from one system to another 28 'usernamecol' => 'login', 29 'passwordcol' => 'password', 30 'db_fields' => array('prenom', 'nom', 'type', 'email'), 31 'cryptType' => 'none' 32 ); 33 34 35 // Link additionnal external authentication attributes to the Claroline 36 // user attribute. 37 // 38 // array KEYS are the Claroline attributes and 39 // array VALUES are the authentication external attributes. 40 41 $extAuthAttribNameList = array ( 42 'lastname' => 'nom', 43 'firstname' => 'prenom', 44 'email' => 'email', 45 'status' => 'type' 46 ); 47 48 // Array setting optionnal preliminary treatment to the data retrieved from the 49 // exernal authentication source. Array KEYS are the concernend claroline 50 // user table fields, and Array VALUES are either the name of a function which 51 // makes the treatment or simply a default value to insert 52 // Note. Treatments doesn't necessary previously require data from the external 53 // authentication system. They're able to be trigged from NULL value ... 54 55 $extAuthAttribTreatmentList = array ('status' => 'manage_user_status_from_ganesha_to_claroline'); 56 57 function manage_user_status_from_ganesha_to_claroline($ganeshaStatus) 58 { 59 switch ($ganeshaStatus) 60 { 61 case 2: // ganesha administrator 62 return 1; // claroline course manager 63 break; 64 65 case 3: // ganesha tutor 66 return 1; // claroline course manager 67 68 case 0: // ganesha trainee 69 return 5; // claroline simple user 70 default: 71 return 5; 72 } 73 } 74 75 76 // PROCESS AUTHENTICATION 77 78 return require dirname(__FILE__).'/../extAuthProcess.inc.php'; 79 80 ?>
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 |
![]() |