public function addRoleToUser($user, $role)
	{
		if (is_string($user)) {
			$user = $this->getUser($user);
		} elseif (!property_exists($user, "_id") || !property_exists($user, "roles")) {
			throw new InvalidArgumentException("user parameter should be the login or a user document");
		}
		if (!in_array($role, $user->roles)) {
			$user->roles[] = $role;
			$client = clone($this->client);
			$client->useDatabase($this->usersdb);
			$client->storeDoc($user);
		}
		return true;
	}