AvatarManager

class OC\Avatar\AvatarManager
This class implements methods to access Avatar functionality
Source:lib/private/Avatar/AvatarManager.php#54
Implements:OCP\IAvatarManager

Properties

Methods

public OC\Avatar\AvatarManager::__construct($userSession, $userManager, $appData, $l, $logger, $config, $accountManager, $knownUserService)
Source:lib/private/Avatar/AvatarManager.php#80
public OC\Avatar\AvatarManager::getAvatar($userId)
return a user specific instance of \OCP\IAvatar
Source:

lib/private/Avatar/AvatarManager.php#108

Parameters:
  • $userId (string) the ownCloud user id
See:

\OCP\IAvatar

Returns:

\OCP\IAvatar

Throws:

\Exception In case the username is potentially dangerous

Throws:

\OCP\Files\NotFoundException In case there is no user folder yet

Throws:

\Exception In case the username is potentially dangerous

Throws:

\OCP\Files\NotFoundException In case there is no user folder yet

public OC\Avatar\AvatarManager::clearCachedAvatars()
Clear generated avatars
Source:lib/private/Avatar/AvatarManager.php#151
public OC\Avatar\AvatarManager::deleteUserAvatar($userId)
Source:lib/private/Avatar/AvatarManager.php#164
public OC\Avatar\AvatarManager::getGuestAvatar($name)
Returns a GuestAvatar.
Source:

lib/private/Avatar/AvatarManager.php#184

Parameters:
  • $name (string) The guest name, e.g. “Albert”.
Returns:

\OCP\IAvatar