當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。