gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge-plugin-ldapextauth/etc config.php, NONE, 1.1 map


From: lo-lan-do
Subject: [Gforge-commits] gforge-plugin-ldapextauth/etc config.php, NONE, 1.1 mapping.php, NONE, 1.1
Date: Thu, 23 Sep 2004 16:11:24 -0500

Update of /cvsroot/gforge/gforge-plugin-ldapextauth/etc
In directory db.perdue.net:/tmp/cvs-serv14060/etc

Added Files:
        config.php mapping.php 
Log Message:
Public release of working code.

--- NEW FILE: config.php ---
<?php

$base_dn = "dc=users,dc=example,dc=com" ;
$ldap_server = "ldap.example.com" ;

// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:

?>

--- NEW FILE: mapping.php ---
<?php

function plugin_ldapextauth_mapping ($entry) {
        $result = array () ;
        
        $realname = $entry['gecos'][0] ;
        $rnarray = explode (' ', $realname, 2) ;

        $result['firstname'] = $rnarray[0] ;
        $result['lastname'] = $rnarray[1] ;
        $result['email'] = $entry['uid'][0] . '@' . 
$GLOBALS['sys_default_domain'] ;
        // You may also want to customise $result['language_id']
        // You may also want to customise $result['timezone']
        // You may also want to customise $result['jabber_address']
        // You may also want to customise $result['address']
        // You may also want to customise $result['address2']
        // You may also want to customise $result['phone']
        // You may also want to customise $result['fax']
        // You may also want to customise $result['title']
        // You may also want to customise $result['ccode']
        
        return $result ;
}

function plugin_ldapextauth_getdn ($plugin, $username) {
        return "uid=$username," . $plugin->base_dn ;
}

// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:

?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]