コード例 #1
0
ファイル: Manager.php プロジェクト: rchicoli/owncloud-core
 /**
  * returns a list of attributes that will be processed further, e.g. quota,
  * email, displayname, or others.
  * @param bool $minimal - optional, set to true to skip attributes with big
  * payload
  * @return string[]
  */
 public function getAttributes($minimal = false)
 {
     $attributes = array('dn', 'uid', 'samaccountname', 'memberof');
     $possible = array($this->access->getConnection()->ldapQuotaAttribute, $this->access->getConnection()->ldapEmailAttribute, $this->access->getConnection()->ldapUserDisplayName, $this->access->getConnection()->ldapUserDisplayName2);
     foreach ($possible as $attr) {
         if (!is_null($attr)) {
             $attributes[] = $attr;
         }
     }
     $homeRule = $this->access->getConnection()->homeFolderNamingRule;
     if (strpos($homeRule, 'attr:') === 0) {
         $attributes[] = substr($homeRule, strlen('attr:'));
     }
     if (!$minimal) {
         // attributes that are not really important but may come with big
         // payload.
         $attributes = array_merge($attributes, array('jpegphoto', 'thumbnailphoto'));
     }
     return $attributes;
 }
コード例 #2
0
ファイル: User.php プロジェクト: GitHubUser4234/core
 /**
  * @brief constructor, make sure the subclasses call this one!
  * @param string $username the internal username
  * @param string $dn the LDAP DN
  * @param IUserTools $access an instance that implements IUserTools for
  * LDAP interaction
  * @param IConfig $config
  * @param FilesystemHelper $fs
  * @param Image $image any empty instance
  * @param LogWrapper $log
  * @param IAvatarManager $avatarManager
  * @param IUserManager $userManager
  */
 public function __construct($username, $dn, IUserTools $access, IConfig $config, FilesystemHelper $fs, Image $image, LogWrapper $log, IAvatarManager $avatarManager, IUserManager $userManager)
 {
     $this->access = $access;
     $this->connection = $access->getConnection();
     $this->config = $config;
     $this->fs = $fs;
     $this->dn = $dn;
     $this->uid = $username;
     $this->image = $image;
     $this->log = $log;
     $this->avatarManager = $avatarManager;
     $this->userManager = $userManager;
 }