~sit-developers/sit/master

« back to all changes in this revision

Viewing changes to lib/ldap.inc.php

  • Committer: Paul Heaney
  • Date: 2014-05-04 15:48:48 UTC
  • mfrom: (1239.1.75)
  • mto: (1239.1.78)
  • mto: This revision was merged to the branch mainline in revision 1265.
  • Revision ID: git-v1:60a1fbe93e828fa02620bd852c5ec33ed9a335c5
Merge branch 'master' of gitorious.org:~paulheaney/sit/paulheaneys-sit

Show diffs side-by-side

added added

removed removed

Lines of Context:
442
442
                $contact->id = $id;
443
443
                $status = $contact->edit();
444
444
            }
445
 
            
 
445
 
446
446
            if ($status) $toReturn = true;
447
447
            else $toReturn = false;
448
448
        }
493
493
    debug_log("LDAP Filter: {$filter}", TRUE);
494
494
    debug_log("LDAP Base: {$base}", TRUE);
495
495
    $sr = ldap_search($ldap_conn, $base, $filter, $attributes);
496
 
    
 
496
 
497
497
    if (ldap_count_entries($ldap_conn, $sr) != 1)
498
498
    {
499
499
        // Multiple or zero
501
501
        $toReturn = false;
502
502
    }
503
503
    else
504
 
    {            
 
504
    {
505
505
        // just one
506
506
        debug_log("LDAP got details for object: '$username'", TRUE);
507
507
        $toReturn  = ldap_first_entry($ldap_conn, $sr);
541
541
        * Verify roles
542
542
        */
543
543
        $entry = ldap_getDetails($username, $searchOnEmail, $ldap_conn);
544
 
        
 
544
 
545
545
        if (!$entry)
546
546
        {
547
547
            // Multiple or zero