fix error message and comment

This commit is contained in:
Morris Jobke 2016-01-20 14:21:54 +01:00
parent dbfa143e2d
commit 7b54bf26ea

View file

@ -255,10 +255,10 @@ class Manager extends PublicEmitter implements IUserManager {
public function createUser($uid, $password) {
$l = \OC::$server->getL10N('lib');
// Check the name for bad characters
// Allowed are: "a-z", "A-Z", "0-9" and "_.@-"
// Allowed are: "a-z", "A-Z", "0-9" and "_.@-'"
if (preg_match('/[^a-zA-Z0-9 _\.@\-\']/', $uid)) {
throw new \Exception($l->t('Only the following characters are allowed in a username:'
. ' "a-z", "A-Z", "0-9", and "_.@-"\''));
. ' "a-z", "A-Z", "0-9", and "_.@-\'"'));
}
// No empty username
if (trim($uid) == '') {