当前位置: 首页>>代码示例>>PHP>>正文


PHP IConfig::getUsersForUserValue方法代码示例

本文整理汇总了PHP中OCP\IConfig::getUsersForUserValue方法的典型用法代码示例。如果您正苦于以下问题:PHP IConfig::getUsersForUserValue方法的具体用法?PHP IConfig::getUsersForUserValue怎么用?PHP IConfig::getUsersForUserValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OCP\IConfig的用法示例。


在下文中一共展示了IConfig::getUsersForUserValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetchDeletedUsers

 /**
  * reads LDAP users marked as deleted from the database
  * @return OCA\user_ldap\lib\user\OfflineUser[]
  */
 private function fetchDeletedUsers()
 {
     $deletedUsers = $this->config->getUsersForUserValue('user_ldap', 'isDeleted', '1');
     $userObjects = array();
     foreach ($deletedUsers as $user) {
         $userObjects[] = new OfflineUser($user, $this->config, $this->db, $this->mapping);
     }
     $this->deletedUsers = $userObjects;
     return $this->deletedUsers;
 }
开发者ID:heldernl,项目名称:owncloud8-extended,代码行数:14,代码来源:deletedusersindex.php

示例2: getByEmail

 /**
  * @param string $email
  * @return IUser[]
  * @since 9.1.0
  */
 public function getByEmail($email)
 {
     $userIds = $this->config->getUsersForUserValue('settings', 'email', $email);
     return array_map(function ($uid) {
         return $this->get($uid);
     }, $userIds);
 }
开发者ID:stweil,项目名称:owncloud-core,代码行数:12,代码来源:manager.php

示例3: getUserFromToken

 /**
  * Get the user for the token
  *
  * @return string
  * @throws \UnexpectedValueException If the token is invalid, does not exist or is not unique
  */
 protected function getUserFromToken()
 {
     $token = (string) $this->request->getParam('token', '');
     if (strlen($token) !== 30) {
         throw new \UnexpectedValueException('The token is invalid');
     }
     $users = $this->config->getUsersForUserValue('activity', 'rsstoken', $token);
     if (sizeof($users) !== 1) {
         // No unique user found
         throw new \UnexpectedValueException('The token is invalid');
     }
     // Token found login as that user
     return array_shift($users);
 }
开发者ID:kenwi,项目名称:core,代码行数:20,代码来源:activitymanager.php

示例4: feed

 /**
  * @NoAdminRequired
  *
  * @param string $enable	'true' if the feed is enabled
  * @return DataResponse
  */
 public function feed($enable)
 {
     $token = $tokenUrl = '';
     if ($enable === 'true') {
         $conflicts = true;
         // Check for collisions
         while (!empty($conflicts)) {
             $token = $this->random->generate(30);
             $conflicts = $this->config->getUsersForUserValue('activity', 'rsstoken', $token);
         }
         $tokenUrl = $this->urlGenerator->linkToRouteAbsolute('activity.Feed.show', ['token' => $token]);
     }
     $this->config->setUserValue($this->user, 'activity', 'rsstoken', $token);
     return new DataResponse(array('data' => array('message' => (string) $this->l10n->t('Your settings have been updated.'), 'rsslink' => $tokenUrl)));
 }
开发者ID:samj1912,项目名称:repo,代码行数:21,代码来源:settings.php

示例5: getUsersForValue

 /**
  * Gets the users for a preference
  * @param string $app
  * @param string $key
  * @param string $value
  * @return array
  * @deprecated use getUsersForUserValue of \OCP\IConfig instead
  */
 public function getUsersForValue($app, $key, $value)
 {
     return $this->config->getUsersForUserValue($app, $key, $value);
 }
开发者ID:samj1912,项目名称:repo,代码行数:12,代码来源:preferences.php


注:本文中的OCP\IConfig::getUsersForUserValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。