Ignore:
Timestamp:
06/29/07 15:18:52 (17 years ago)
Author:
niltonneto
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/instant_messenger/inc/class.contacts_im.inc.php

    r33 r36  
    7878                        return 0; 
    7979        } 
     80         
     81        function UserPermission($param) 
     82        { 
     83                $db_acls = $this->db_user->get_accounts_acl(); 
     84                $members = array();              
     85                $search_uid     = ""; 
     86                $search_groups = "|"; 
     87                 
     88                $search_uid = $this->ldap->list_users_ldap("uid=".$param['uid']); 
     89 
     90                foreach($db_acls as $tmp) 
     91                        if($tmp['acl_account'] == $search_uid[0]['uidnumber']) 
     92                                return 1; 
     93                        else 
     94                                $search_groups .= "(gidNumber=".$tmp['acl_account'].")"; 
     95 
     96                $groups = $this->ldap->list_groups_ldap($search_groups); 
     97 
     98                if($groups) 
     99                foreach($groups as $tmp){ 
     100                        $members = $tmp['members'];      
     101                        foreach($members as $mb){                
     102                                if(trim($mb) == trim($search_uid[0]['uid'])) 
     103                                        return 1; 
     104                        }                        
     105                } 
     106                 
     107                return 0; 
     108        } 
    80109} 
    81110?> 
Note: See TracChangeset for help on using the changeset viewer.