/[ludap]/ludap/ludap.lib.php
ViewVC logotype

Diff of /ludap/ludap.lib.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mose, Thu Sep 4 18:19:42 2003 UTC revision 1.10 by mose, Thu Sep 4 23:24:57 2003 UTC
# Line 54  class ludap { Line 54  class ludap {
54                  $schema_user =& $C->get($this->schema_user_file);                  $schema_user =& $C->get($this->schema_user_file);
55                  foreach ($schema_user as $att=>$att_activated) {                  foreach ($schema_user as $att=>$att_activated) {
56                          if ($att_activated) {                          if ($att_activated) {
57                                  $this->schema_user = array_merge($this->schema_user, array($att => $C->get($this->schema_user_file,$att)));                                  $pasc = $C->get($this->schema_user_file,$att);
58                                  $this->attributes_user[] = $att;                                  $this->schema_user = array_merge($this->schema_user, array($att => $pasc));
59                                    if ($pasc['TYPE'] != 'password') {
60                                            $this->attributes_user[] = $att;
61                                    }
62                          }                          }
63                  }                  }
64                    //echo'<pre>';print_r($this->attributes_user);echo'</pre>';die();
65                                    
66                  $schema_group =& $C->get($this->schema_group_file);                  $schema_group =& $C->get($this->schema_group_file);
67                  foreach ($schema_group as $att=>$att_activated) {                  foreach ($schema_group as $att=>$att_activated) {
# Line 179  class ludap { Line 183  class ludap {
183                  for ($n = 0; $n < $info['count']; $n++) {                  for ($n = 0; $n < $info['count']; $n++) {
184                          foreach ($heads as $lt) {                          foreach ($heads as $lt) {
185                                  if (isset($info[$n]["$lt"][0])) {                                  if (isset($info[$n]["$lt"][0])) {
186                                          $inf[$n][$lt] = $info[$n]["$lt"][0];                                          $inf[$n][$lt] = utf8_decode($info[$n]["$lt"][0]);
187                                  } else {                                  } else {
188                                          $inf[$n][$lt] = '';                                          $inf[$n][$lt] = '';
189                                  }                                  }
# Line 244  class ludap { Line 248  class ludap {
248                  global $conn;                  global $conn;
249                  $fres = array();                  $fres = array();
250                  if (is_array($attrs)) {                  if (is_array($attrs)) {
251                          $i = ldap_search($this->conn,$this->conf['basedn'],$this->conf['baseattr']."=$id",$attrs);                          $i = ldap_search($this->conn, $this->conf['basedn'], $this->conf['baseattr']."=".utf8_encode($id),$attrs);
252                  } else {                  } else {
253                          $i = ldap_search($this->conn,$this->conf['basedn'],$this->conf['baseattr']."=$id");                          $i = ldap_search($this->conn, $this->conf['basedn'], $this->conf['baseattr']."=".utf8_encode($id));
254                  }                  }
255                  $info = ldap_get_entries($this->conn,$i);                  $info = ldap_get_entries($this->conn, $i);
256                  foreach ($this->schema_user as $clabel=>$cbuff) {                  foreach ($this->schema_user as $clabel=>$cbuff) {
257                          if ($cbuff['TYPE'] == 'multi') {                          if ($cbuff['TYPE'] == 'multi') {
258                                  if ($info[0][$clabel][count]) {                                  if ($info[0][$clabel][count]) {
# Line 324  class ludap { Line 328  class ludap {
328    
329          }          }
330                    
331            function del_user($id) {
332                    return ldap_delete($this->conn, $this->conf['baseattr']."=".utf8_encode($id).", ".$this->conf['basedn']);
333            }
334            
335          function defaultdir($id) {          function defaultdir($id) {
336                  return "/home/$id";                  return "/home/$id";
337          }          }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26