chkout_ldap_sync.php File Reference

Go to the source code of this file.

Functions

 handle_pear_error ($error_obj)
 sync_borrower ($in_id, $in_fname, $in_lname, $in_barcode, $in_type, $in_email)
 sync_attrib ($in_id, $in_attrib, $in_val)

Variables

 $s_srcdsn ['phptype'] = 'ldap'
 $s_destdsn = "mysql://fastframe:password@localhost/fastframe"
 $o_srcDb = DB::connect($s_srcdsn)
 $o_destDb = DB::connect($s_destdsn)
 $s_sql
 $o_result = $o_destDb->query($s_sql, null, DB_FETCHMODE_ASSOC)
 $result


Function Documentation

handle_pear_error error_obj  ) 
 

Definition at line 25 of file chkout_ldap_sync.php.

sync_attrib in_id,
in_attrib,
in_val
 

Definition at line 108 of file chkout_ldap_sync.php.

References $a_borrowers, $o_destDb, and $s_sql.

sync_borrower in_id,
in_fname,
in_lname,
in_barcode,
in_type,
in_email
 

Definition at line 76 of file chkout_ldap_sync.php.

References $a_borrowers, $o_destDb, $o_srcDb, and $s_sql.


Variable Documentation

$o_destDb = DB::connect($s_destdsn)
 

Definition at line 34 of file chkout_ldap_sync.php.

$o_result = $o_destDb->query($s_sql, null, DB_FETCHMODE_ASSOC)
 

Definition at line 42 of file chkout_ldap_sync.php.

$o_srcDb = DB::connect($s_srcdsn)
 

Definition at line 33 of file chkout_ldap_sync.php.

$result
 

Initial value:

 $o_srcDb->simpleQuery('objectClass=person', 'search', 
        array('attributes' => array('employeeid', 'givenName', 'sn', 'streetAddress', 'st', 'l', 'postalCode', 'homePhone', 'mail', 'samaccountname')))

Definition at line 50 of file chkout_ldap_sync.php.

$s_destdsn = "mysql://fastframe:password@localhost/fastframe"
 

Definition at line 21 of file chkout_ldap_sync.php.

$s_sql
 

Initial value:

"SELECT * FROM chkout_borrowers 
        INNER JOIN chkout_borrower_attributes ON chkout_borrowers.id = chkout_borrower_attributes.borrower_id AND 
            chkout_borrower_attributes.k='samaccountname'"

Definition at line 39 of file chkout_ldap_sync.php.

$s_srcdsn['hostspec'] = 'ldap'
 

Grabs data from an ldap server updates the borrower table with new data. It makes sure that new users are instered and existing users are only updated (so that their borrower id remains constant).

Author:
Jason Rust <jrust@codejanitor.com>

Definition at line 15 of file chkout_ldap_sync.php.


Generated on Fri Jun 23 11:38:19 2006 for FastFrame by  doxygen 1.4.4