use OC\Accounts\AccountManager;
use OC\AppFramework\Http;
use OC\ForbiddenException;
+use OC\HintException;
use OC\Settings\Mailer\NewUserMailHelper;
use OC\Security\IdentityProof\Manager;
use OCP\App\IAppManager;
$user = $this->userManager->createUser($username, $password);
} catch (\Exception $exception) {
$message = $exception->getMessage();
+ if ($exception instanceof HintException && $exception->getHint()) {
+ $message = $exception->getHint();
+ }
if (!$message) {
$message = $this->l10n->t('Unable to create user.');
}