use OCP\Security\ISecureRandom;
use OCP\Security\Events\GenerateSecurePasswordEvent;
use OCP\EventDispatcher\IEventDispatcher;
+use OCP\User\Backend\ISetDisplayNameBackend;
class UsersController extends AUserData {
public function getEditableFields(?string $userId = null): DataResponse {
$currentLoggedInUser = $this->userSession->getUser();
if (!$currentLoggedInUser instanceof IUser) {
- throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
+ throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
}
$permittedFields = [];
if ($userId !== $currentLoggedInUser->getUID()) {
$targetUser = $this->userManager->get($userId);
if (!$targetUser instanceof IUser) {
- throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
+ throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
}
$subAdminManager = $this->groupManager->getSubAdmin();
if (!$this->groupManager->isAdmin($currentLoggedInUser->getUID())
&& !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
- throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
+ throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
}
} else {
$targetUser = $currentLoggedInUser;