Returns an array of users with login/id pairs.

@param bool  $forceUpdate to force the update of the users var
@param array $params      to allow offset/limit (and more) to be passed

@return array list of users (id => username)
182502
public function listing($forceUpdate = false, array $params = [])
    {
        if (empty($this->users) || $forceUpdate) {
            $this->all($params);
        }
        $ret = [];
        if (is_array($this->users) && isset($this->users['users'])) {
            foreach ($this->users['users'] as $e) {
                $ret[$e['login']] = (int) $e['id'];
            }
        }

        return $ret;
    }
277534
public function getChanged(UserUpdater $update)
    {
        $changed = [];
        $ref = new \ReflectionClass($this);
        foreach ($ref->getProperties() as $prop) {
            $method = 'get' . ucfirst($prop->getName());
            $newVal = $update->$method();
            if ($this->$method() != $newVal) {
                $changed[$prop->getName()] = $newVal;
            }
        }

        return $changed;
    }
1174075
public function getUpdates($force = FALSE) {
		if (!$force) {
			$result = $this->cache->get('updates');
			if ($result) {
				return $result;
			}
		}

		// Make sure we're logged in and have a valid access token.
		if (!$this->auth_token || !$this->username) {
			return FALSE;
		}

		$timestamp = parent::timestamp();
		$result = parent::post(
			'/all_updates',
			array(
				'timestamp' => $timestamp,
				'username' => $this->username,
			),
			array(
				$this->auth_token,
				$timestamp,
			)
		);

		if (!empty($result->updates_response)) {
			$this->auth_token = $result->updates_response->auth_token;
			$this->cache->set('updates', $result->updates_response);
			return $result->updates_response;
		}

		return $result;
	}
564107
public function update($params)
    {
        if (is_array($params)) {
            $count_rows = count($params['columns']);
            $increment = 1;
            foreach ($params['columns'] as $keys => $value) {
                for ($i = 1; $i <= $count_rows; $i++) {
                    $data[$keys] = $value;
                }
            }
            foreach ($data as $keys => $values) {
                if ($increment == $count_rows) {
                    $columns[] = "{$keys} = '{$values}'";
                } else {
                    $columns[] = "{$keys} = '{$values}'";
                }
                $increment++;
            }
            $columns = implode(' , ', $columns);
            $wheres = $this->prepareWhere($params['wheres']);
            $query = "UPDATE `{$params['table']}`SET {$columns} {$wheres}";
            if (isset($params['debug']) and strtolower($params['debug']) === 'on') {
                var_dump($query);
            }

            return $query;
        } else {
            return false;
        }
    }
1207632
function GetAssoc($force_array = false, $first2cols = false)
	{
		$records = $this->_numOfRows;
		$results = array();
		for ( $i=0; $i < $records; $i++ ) {
			foreach ( $this->fields as $k=>$v ) {
				if ( is_array( $v ) ) {
					if ( $v['count'] == 1 ) {
						$results[$i][$k] = $v[0];
					} else {
						array_shift( $v );
						$results[$i][$k] = $v;
					}
				}
			}
		}

		return $results;
	}
175379
public function update(string $ref, string $sha, bool $force = false): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/refs/:ref',
            $this->getGitData()->getOwner(), $this->getGitData()->getRepo(), $ref), Request::METHOD_POST, [
                'sha'   => $sha,
                'force' => $force
            ]);
    }
178311
public function updateDefault(array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::PUT,
            ResourceMethodEnum::UPDATE_DEFAULT,
            $params,
            null
        );
    }
324870
public function listUserProfiles($optParams = array()) {
      $params = array();
      $params = array_merge($params, $optParams);
      $data = $this->__call('list', array($params));
      if ($this->useObjects()) {
        return new UserProfileList($data);
      } else {
        return $data;
      }
    }
271487
public function listing($project, $forceUpdate = false)
    {
        if (true === $forceUpdate || empty($this->issueCategories)) {
            $this->all($project);
        }
        $ret = [];
        foreach ($this->issueCategories['issue_categories'] as $e) {
            $ret[$e['name']] = (int) $e['id'];
        }

        return $ret;
    }
983541
public function update($params = [])
    {
        $id = Arr::get($params, 'id', null);

        if (!$id) {
            throw new InvalidArgumentException('We need an id');
        }

        // json_patch required
        return $this->gateway->commit('patch', $this->gateway->buildUrlFromString('notifications/webhooks/'.$id), [], $params);
    }
1003521
public function getSubmitParams($params) {

    $submitParams = array();
    foreach ($this->paramFields as $k => $mandatory) {
      if (isset($params[$k]) && strlen($params[$k]) > 0) {
        $submitParams[$k] = $params[$k];
      }
      elseif ((!isset($params[$k]) || strlen($params[$k]) == 0) && $mandatory) {
        throw new \Exception('mandatory field ' . $k . ' is unset or empty');
      }
    }

    return $submitParams;
  }
1221070
@Deprecated
    public List<String> getUsers() {
        String value = getParameter(UsernameActivationStrategy.PARAM_USERS);
        if (Strings.isNotBlank(value)) {
            return Strings.splitAndTrim(value, ",");
        }
        return Collections.emptyList();
    }
249232
public function update($id, array $params)
    {
        $defaults = [
            'id' => $id,
            'login' => null,
            'password' => null,
            'lastname' => null,
            'firstname' => null,
            'mail' => null,
        ];
        $params = $this->sanitizeParams($defaults, $params);

        $xml = new \SimpleXMLElement('<?xml version="1.0"?><user></user>');
        foreach ($params as $k => $v) {
            if ('custom_fields' === $k) {
                $this->attachCustomFieldXML($xml, $v);
            } else {
                $xml->addChild($k, $v);
            }
        }

        return $this->put('/users/'.$id.'.xml', $xml->asXML());
    }
66506
public static function classNameForApplicablePropertyModelId($id, $forceRefresh = false)
    {
        self::retrieveApplicablePropertyModels($forceRefresh);
        return array_search($id, self::$applicablePropertyModels, true);
    }
824173
public function getMembers($force = false)
    {
        if ($this->nb_user_group_member_list->isEmpty() || $force) {
            $this->nb_user_group_member_list->clear();
            if ($this->isValueNumeric('nb_user_group_id')) {
                $this->nb_user_group_member_list->merge(CNabuUserGroupMember::getMembersOfGroup($this));
            }
        }

        return $this->nb_user_group_member_list;
    }
1159925
public function getDeniedFriendships($limit = null, $offset = 0): array
    {
        return $this->findFriendshipsByStatus(Status::DENIED, $limit, $offset);
    }
1238009
public function update($params, $optParams = [])
    {
        if (!$params instanceof AccessToken) {
            throw new InvalidParamException(AccessToken::class . ' is required!');
        }
        $class = get_class($params);

        return $this->sendRequest([], [
            'restAction' => 'update',
            'restId' => $params->id,
            'postParams' => $params->toArray(),
            'getParams' => $optParams,
        ], function ($response) use ($class) {
            return isset($response->data) ? new $class($response->data) : $response;
        });
    }