}
// Check if email exists already.
- if (!UserUtil::isAvailableEmail($email)) {
+ if (User::getUserByEmail($email)->userID) {
throw new UserInputException('email', 'notUnique');
}
namespace wcf\data\user;
use wcf\util\UserRegistrationUtil;
-use wcf\util\UserUtil;
/**
* Executes user registration-related actions.
];
}
- if (!UserUtil::isAvailableEmail($this->parameters['email'])) {
+ if (User::getUserByEmail($this->parameters['email'])->userID) {
return [
'isValid' => false,
'error' => 'notUnique',
use wcf\util\JSON;
use wcf\util\StringUtil;
use wcf\util\UserRegistrationUtil;
-use wcf\util\UserUtil;
/**
* Shows the account management form.
}
// checks if email already exists.
- if (!UserUtil::isAvailableEmail($this->email)) {
+ if (User::getUserByEmail($this->email)->userID) {
throw new UserInputException('email', 'notUnique');
}
}
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\util\HeaderUtil;
-use wcf\util\UserUtil;
/**
* Shows the email activation form.
}
// check whether the new email isn't unique anymore
- if (!UserUtil::isAvailableEmail($this->user->newEmail)) {
+ if (User::getUserByEmail($this->user->newEmail)->userID) {
throw new NamedUserException(WCF::getLanguage()->get('wcf.user.email.error.notUnique'));
}
use wcf\util\HeaderUtil;
use wcf\util\StringUtil;
use wcf\util\UserRegistrationUtil;
-use wcf\util\UserUtil;
/**
* Shows the new activation code form.
}
// Check if email exists already.
- if (!UserUtil::isAvailableEmail($this->email)) {
+ if (User::getUserByEmail($this->email)->userID) {
throw new UserInputException('email', 'notUnique');
}
} else {