/**
  * reads LDAP users marked as deleted from the database
  * @param int $offset
  * @return OCA\user_ldap\lib\user\OfflineUser[]
  */
 private function fetchDeletedUsers($offset)
 {
     $deletedUsers = $this->preferences->getUsersForValue('user_ldap', 'isDeleted', '1', $this->limit, $offset);
     $key = $this->getDeletedUsersCacheKey($this->limit, $offset);
     $userObjects = array();
     foreach ($deletedUsers as $user) {
         $userObjects[] = new OfflineUser($user, $this->preferences, $this->db, $this->access);
     }
     $this->deletedUsers[$key] = $userObjects;
     if (count($userObjects) > 0) {
         $this->hasUsers();
     }
     return $this->deletedUsers[$key];
 }
Esempio n. 2
0
 /**
  * reads the user details
  */
 protected function fetchDetails()
 {
     $properties = array('displayName' => 'user_ldap', 'uid' => 'user_ldap', 'homePath' => 'user_ldap', 'email' => 'settings', 'lastLogin' => 'login');
     foreach ($properties as $property => $app) {
         $this->{$property} = $this->preferences->getValue($this->ocName, $app, $property, '');
     }
     $dn = $this->access->ocname2dn($this->ocName, true);
     $this->dn = $dn !== false ? $dn : '';
     $this->determineShares();
 }