Nextcloud PHP API (master)

IManager

This interface allows to manage the user status.

This interface must not be implemented in your application but instead should be used as a service and injected in your code with dependency injection.

Tags
since
20.0.0

Table of Contents

Methods

getUserStatuses()  : array<string, IUserStatus>
Gets the statuses for all users in $users
revertMultipleUserStatus()  : void
Revert an automatically set user status. For example after leaving a call, change back to the previously set status.
revertUserStatus()  : void
Revert an automatically set user status. For example after leaving a call, change back to the previously set status.
setUserStatus()  : void
Set a new status for the selected user.

Methods

getUserStatuses()

Gets the statuses for all users in $users

public getUserStatuses(array<string|int, string> $userIds) : array<string, IUserStatus>
Parameters
$userIds : array<string|int, string>
Tags
since
20.0.0
Return values
array<string, IUserStatus>

array key being the userid, users without a status will not be in the returned array

revertMultipleUserStatus()

Revert an automatically set user status. For example after leaving a call, change back to the previously set status.

public revertMultipleUserStatus(array<string|int, string> $userIds, string $messageId, string $status) : void
Parameters
$userIds : array<string|int, string>

The user for which we want to update the status.

$messageId : string

The expected current messageId. If the user has already updated their status, this method does nothing.

$status : string

The expected current status. If the user has already updated their status, this method does nothing.

Tags
since
23.0.0

revertUserStatus()

Revert an automatically set user status. For example after leaving a call, change back to the previously set status.

public revertUserStatus(string $userId, string $messageId, string $status) : void
Parameters
$userId : string

The user for which we want to update the status.

$messageId : string

The expected current messageId. If the user has already updated their status, this method does nothing.

$status : string

The expected current status. If the user has already updated their status, this method does nothing.

Tags
since
23.0.0

setUserStatus()

Set a new status for the selected user.

public setUserStatus(string $userId, string $messageId, string $status[, bool $createBackup = false ][, string|null $customMessage = null ]) : void
Parameters
$userId : string

The user for which we want to update the status.

$messageId : string

The id of the predefined message.

$status : string

The status to assign

$createBackup : bool = false

If true, this will store the old status so that it is possible to revert it later (e.g. after a call).

$customMessage : string|null = null
Tags
since
23.0.0
since
28.0.0

Optional parameter $customMessage was added


        
On this page

Search results