fix: replace `Account name` by `Login`

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
pull/34178/head
John Molakvoæ 3 months ago
parent b1a47f79f3
commit 524ed97d62
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF

@ -57,7 +57,7 @@ class OutOfOfficeController extends OCSController {
}
/**
* Get the currently configured out-of-office data of a user.
* Get the currently configured out-of-office data of a user
*
* @param string $userId The user id to get out-of-office data for.
* @return DataResponse<Http::STATUS_OK, DAVCurrentOutOfOfficeData, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>

@ -163,7 +163,7 @@ class Provider implements IProvider {
if (!isset($parsedParameters['user'])) {
// External user via public link share
$subject = str_replace('{user}', $this->activityLang->t('"remote person"'), $subject);
$subject = str_replace('{user}', $this->activityLang->t('"remote account"'), $subject);
}
$this->setSubjects($event, $subject, $parsedParameters);
@ -281,7 +281,7 @@ class Provider implements IProvider {
if (!isset($parsedParameters['user'])) {
// External user via public link share
$subject = str_replace('{user}', $this->activityLang->t('"remote person"'), $subject);
$subject = str_replace('{user}', $this->activityLang->t('"remote account"'), $subject);
}
$this->setSubjects($event, $subject, $parsedParameters);

@ -158,7 +158,7 @@ class Notify extends Base {
} catch (\Exception $e) {
$output->writeln('<error>Error while trying to create storage</error>');
if ($noAuth) {
$output->writeln('<error>Account name and/or password required</error>');
$output->writeln('<error>Login and/or password required</error>');
}
return self::FAILURE;
}

@ -38,7 +38,7 @@ class OpenStackV2 extends AuthMechanism {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('OpenStack v2'))
->addParameters([
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('user', $l->t('Login')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),
new DefinitionParameter('tenant', $l->t('Tenant name')),

@ -42,7 +42,7 @@ class OpenStackV3 extends AuthMechanism {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('OpenStack v3'))
->addParameters([
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('user', $l->t('Login')),
new DefinitionParameter('domain', $l->t('Domain')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),

@ -37,7 +37,7 @@ class Rackspace extends AuthMechanism {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('Rackspace'))
->addParameters([
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('user', $l->t('Login')),
(new DefinitionParameter('key', $l->t('API key')))
->setType(DefinitionParameter::VALUE_PASSWORD),
])

@ -35,9 +35,9 @@ class Password extends AuthMechanism {
$this
->setIdentifier('password::password')
->setScheme(self::SCHEME_PASSWORD)
->setText($l->t('Account name and password'))
->setText($l->t('Login and password'))
->addParameters([
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('user', $l->t('Login')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),
]);

@ -52,7 +52,7 @@ class UserProvided extends AuthMechanism implements IUserProvided {
->setScheme(self::SCHEME_PASSWORD)
->setText($l->t('Manually entered, store in database'))
->addParameters([
(new DefinitionParameter('user', $l->t('Account name')))
(new DefinitionParameter('user', $l->t('Login')))
->setFlag(DefinitionParameter::FLAG_USER_PROVIDED),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD)

@ -47,7 +47,7 @@ class RSA extends AuthMechanism {
->setScheme(self::SCHEME_PUBLICKEY)
->setText($l->t('RSA public key'))
->addParameters([
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('user', $l->t('Login')),
new DefinitionParameter('public_key', $l->t('Public key')),
(new DefinitionParameter('private_key', 'private_key'))
->setType(DefinitionParameter::VALUE_HIDDEN),

@ -46,7 +46,7 @@ class RSAPrivateKey extends AuthMechanism {
->setScheme(self::SCHEME_PUBLICKEY)
->setText($l->t('RSA private key'))
->addParameters([
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('user', $l->t('Login')),
(new DefinitionParameter('password', $l->t('Password')))
->setFlag(DefinitionParameter::FLAG_OPTIONAL)
->setType(DefinitionParameter::VALUE_PASSWORD),

@ -46,7 +46,7 @@ class SMB_OC extends Backend {
->setText($l->t('SMB/CIFS using OC login'))
->addParameters([
new DefinitionParameter('host', $l->t('Host')),
(new DefinitionParameter('username_as_share', $l->t('Account name as share')))
(new DefinitionParameter('username_as_share', $l->t('Login as share')))
->setType(DefinitionParameter::VALUE_BOOLEAN),
(new DefinitionParameter('share', $l->t('Share')))
->setFlag(DefinitionParameter::FLAG_OPTIONAL),

@ -167,7 +167,7 @@ class Swift extends \OC\Files\Storage\Common {
or (empty($params['user']) && empty($params['userid'])) or empty($params['bucket'])
or empty($params['region'])
) {
throw new StorageBadConfigException("API Key or password, Account name, Bucket and Region have to be configured.");
throw new StorageBadConfigException("API Key or password, Login, Bucket and Region have to be configured.");
}
$user = $params['user'];

@ -228,7 +228,7 @@ uasort($sortedBackends, function ($a, $b) {
<input type="text" name="username"
autocomplete="false"
value="<?php p($_['globalCredentials']['user']); ?>"
placeholder="<?php p($l->t('Account name')) ?>"/>
placeholder="<?php p($l->t('Login')) ?>"/>
<input type="password" name="password"
autocomplete="false"
value="<?php p($_['globalCredentials']['password']); ?>"

@ -5,7 +5,7 @@
<name>File sharing</name>
<summary>File sharing</summary>
<description>
This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other people and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices.
This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other accounts and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices.
Turning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation.
</description>

@ -132,7 +132,7 @@ class ChangePasswordController extends Controller {
return new JSONResponse([
'status' => 'error',
'data' => [
'message' => $this->l->t('No account name supplied'),
'message' => $this->l->t('No Login supplied'),
],
]);
}

@ -134,7 +134,7 @@ class NewUserMailHelper {
}
$emailTemplate->addBodyText($l10n->t('Welcome to your %s account, you can add, protect, and share your data.', [$this->themingDefaults->getName()]));
if ($user->getBackendClassName() !== 'LDAP') {
$emailTemplate->addBodyText($l10n->t('Your account name is: %s', [$userId]));
$emailTemplate->addBodyText($l10n->t('Your Login is: %s', [$userId]));
}
if ($generatePasswordResetToken) {
$leftButtonText = $l10n->t('Set your password');

@ -27,7 +27,7 @@
{{ t('settings', 'Use the credentials below to configure your app or device. For security reasons this password will only be shown once.') }}
</p>
<div class="token-dialog__name">
<NcTextField :label="t('settings', 'Account name')" :value="loginName" readonly />
<NcTextField :label="t('settings', 'Login')" :value="loginName" readonly />
<NcButton type="tertiary"
:title="copyLoginNameLabel"
:aria-label="copyLoginNameLabel"

@ -148,7 +148,7 @@ $mail_sendmailmode = [
print_unescaped(' class="hidden"');
} ?>>
<label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label>
<input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP account name'))?>"
<input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Login'))?>"
value="<?php p($_['mail_smtpname']) ?>" />
<input type="text" name="mail_smtppassword" id="mail_smtppassword" autocomplete="off"
placeholder="<?php p($l->t('SMTP Password'))?>" value="<?php p($_['mail_smtppassword']) ?>" />

@ -262,7 +262,7 @@ class NewUserMailHelperTest extends TestCase {
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<th style="Margin:0;color:#0a0a0a;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left">
<p style="Margin:0;Margin-bottom:10px;color:#777;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:center">Your account name is: john</p>
<p style="Margin:0;Margin-bottom:10px;color:#777;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:center">Your Login is: john</p>
</th>
<th class="expander" style="Margin:0;color:#0a0a0a;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th>
</tr>
@ -363,7 +363,7 @@ Welcome aboard
Welcome to your TestCloud account, you can add, protect, and share your data.
Your account name is: john
Your Login is: john
Set your password: https://example.com/resetPassword/MySuperLongSecureRandomToken
@ -498,7 +498,7 @@ EOF;
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<th style="Margin:0;color:#0a0a0a;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left">
<p style="Margin:0;Margin-bottom:10px;color:#777;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:center">Your account name is: john</p>
<p style="Margin:0;Margin-bottom:10px;color:#777;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;margin-bottom:10px;padding:0;text-align:center">Your Login is: john</p>
</th>
<th class="expander" style="Margin:0;color:#0a0a0a;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0!important;text-align:left;visibility:hidden;width:0"></th>
</tr>
@ -599,7 +599,7 @@ Welcome aboard John Doe
Welcome to your TestCloud account, you can add, protect, and share your data.
Your account name is: john
Your Login is: john
Go to TestCloud: https://example.com/

@ -64,10 +64,10 @@ class Install extends Command {
->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database')
->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost')
->addOption('database-port', null, InputOption::VALUE_REQUIRED, 'Port the database is listening on')
->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'Account name to connect to the database')
->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'Login to connect to the database')
->addOption('database-pass', null, InputOption::VALUE_OPTIONAL, 'Password of the database user', null)
->addOption('database-table-space', null, InputOption::VALUE_OPTIONAL, 'Table space of the database (oci only)', null)
->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'Account name of the admin account', 'admin')
->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'Login of the admin account', 'admin')
->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account')
->addOption('admin-email', null, InputOption::VALUE_OPTIONAL, 'E-Mail of the admin account')
->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT."/data");

@ -65,7 +65,7 @@ class Add extends Command {
'display-name',
null,
InputOption::VALUE_OPTIONAL,
'Account name used in the web UI (can contain any characters)'
'Login used in the web UI (can contain any characters)'
)
->addOption(
'group',

@ -58,7 +58,7 @@ class Add extends Command {
->addArgument(
'user',
InputArgument::REQUIRED,
'Account name to add app password for'
'Login to add app password for'
)
->addOption(
'password-from-env',

@ -55,7 +55,7 @@ class ResetPassword extends Base {
->addArgument(
'user',
InputArgument::REQUIRED,
'Account name to reset password'
'Login to reset password'
)
->addOption(
'password-from-env',

@ -60,7 +60,7 @@
<h2 class="login-form__headline" data-login-form-headline v-html="headline" />
<NcTextField id="user"
ref="user"
:label="t('core', 'Account name or email')"
:label="t('core', 'Login or email')"
name="user"
:value.sync="user"
:class="{shake: invalidPassword}"
@ -176,7 +176,7 @@ export default {
},
errorLabel() {
if (this.invalidPassword) {
return t('core', 'Wrong account name or password.')
return t('core', 'Wrong login or password.')
}
if (this.userDisabled) {
return t('core', 'This account is disabled')

@ -10,8 +10,8 @@
:value="user"
:autocomplete="autoCompleteAllowed ? 'on' : 'off'"
:error="!validCredentials"
:label="t('core', 'Account name or email')"
:placeholder="t('core', 'Account name or email')"
:label="t('core', 'Login or email')"
:placeholder="t('core', 'Login or email')"
:helper-text="!validCredentials ? t('core', 'Your account is not setup for passwordless login.') : ''"
@update:value="changeUsername" />

@ -26,14 +26,14 @@
:value.sync="user"
name="user"
autocapitalize="off"
:label="t('core', 'Account name or email')"
:label="t('core', 'Login or email')"
required
@change="updateUsername" />
<LoginButton :value="t('core', 'Reset password')" />
<NcNoteCard v-if="message === 'send-success'"
type="success">
{{ t('core', 'If this account exists, a password reset message has been sent to its email address. If you do not receive it, verify your email address and/or account name, check your spam/junk folders or ask your local administration for help.') }}
{{ t('core', 'If this account exists, a password reset message has been sent to its email address. If you do not receive it, verify your email address and/or Login, check your spam/junk folders or ask your local administration for help.') }}
</NcNoteCard>
<NcNoteCard v-else-if="message === 'send-error'"
type="error">

@ -35,7 +35,7 @@ script('core', 'install');
<fieldset id="adminaccount">
<legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend>
<p>
<label for="adminlogin"><?php p($l->t('Account name')); ?></label>
<label for="adminlogin"><?php p($l->t('Login')); ?></label>
<input type="text" name="adminlogin" id="adminlogin"
value="<?php p($_['adminlogin']); ?>"
autocomplete="off" autocapitalize="none" spellcheck="false" autofocus required>

@ -53,8 +53,8 @@ $urlGenerator = $_['urlGenerator'];
<form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.apptokenRedirect')); ?>" method="post" id="app-token-login-field" class="hidden">
<p class="grouptop">
<input type="text" name="user" id="user" placeholder="<?php p($l->t('Account name')) ?>">
<label for="user" class="infield"><?php p($l->t('Account name')) ?></label>
<input type="text" name="user" id="user" placeholder="<?php p($l->t('Login')) ?>">
<label for="user" class="infield"><?php p($l->t('Login')) ?></label>
</p>
<p class="groupbottom">
<input type="password" name="password" id="password" placeholder="<?php p($l->t('App password')) ?>">

@ -53,8 +53,8 @@ $urlGenerator = $_['urlGenerator'];
<form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.apptokenRedirect')); ?>" method="post" id="app-token-login-field" class="hidden">
<p class="grouptop">
<input type="text" name="user" id="user" placeholder="<?php p($l->t('Account name')) ?>">
<label for="user" class="infield"><?php p($l->t('Account name')) ?></label>
<input type="text" name="user" id="user" placeholder="<?php p($l->t('Login')) ?>">
<label for="user" class="infield"><?php p($l->t('Login')) ?></label>
</p>
<p class="groupbottom">
<input type="password" name="password" id="password" placeholder="<?php p($l->t('App password')) ?>">

@ -103,7 +103,7 @@ describe('Login', () => {
// Then I see that the current page is the Login page
cy.url().should('match', /\/login/)
// And I see that a wrong password message is shown
cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+account/))
cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+login/))
cy.get('input[name="password"]:invalid').should('exist')
})
@ -125,7 +125,7 @@ describe('Login', () => {
// Then I see that the current page is the Login page
cy.url().should('match', /\/login/)
// And I see that a wrong password message is shown
cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+account/))
cy.get('form[name="login"]').then(($el) => expect($el.text()).to.match(/Wrong.+password/i).and.to.match(/Wrong.+login/))
cy.get('input[name="password"]:invalid').should('exist')
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -265,7 +265,7 @@ class Setup {
$dbType = $options['dbtype'];
if (empty($options['adminlogin'])) {
$error[] = $l->t('Set an admin account name.');
$error[] = $l->t('Set an admin Login.');
}
if (empty($options['adminpass'])) {
$error[] = $l->t('Set an admin password.');

@ -71,9 +71,9 @@ abstract class AbstractDatabase {
public function validate($config) {
$errors = [];
if (empty($config['dbuser']) && empty($config['dbname'])) {
$errors[] = $this->trans->t("Enter the database account name and name for %s", [$this->dbprettyname]);
$errors[] = $this->trans->t("Enter the database Login and name for %s", [$this->dbprettyname]);
} elseif (empty($config['dbuser'])) {
$errors[] = $this->trans->t("Enter the database account name for %s", [$this->dbprettyname]);
$errors[] = $this->trans->t("Enter the database Login for %s", [$this->dbprettyname]);
} elseif (empty($config['dbname'])) {
$errors[] = $this->trans->t("Enter the database name for %s", [$this->dbprettyname]);
}

@ -73,7 +73,7 @@ class MySQL extends AbstractDatabase {
$this->logger->error($e->getMessage(), [
'exception' => $e,
]);
throw new \OC\DatabaseSetupException($this->trans->t('MySQL account name and/or password not valid'),
throw new \OC\DatabaseSetupException($this->trans->t('MySQL Login and/or password not valid'),
$this->trans->t('You need to enter details of an existing account.'), 0, $e);
}
}

@ -53,9 +53,9 @@ class OCI extends AbstractDatabase {
public function validate($config) {
$errors = [];
if (empty($config['dbuser']) && empty($config['dbname'])) {
$errors[] = $this->trans->t("Enter the database account name and name for %s", [$this->dbprettyname]);
$errors[] = $this->trans->t("Enter the database Login and name for %s", [$this->dbprettyname]);
} elseif (empty($config['dbuser'])) {
$errors[] = $this->trans->t("Enter the database account name for %s", [$this->dbprettyname]);
$errors[] = $this->trans->t("Enter the database Login for %s", [$this->dbprettyname]);
} elseif (empty($config['dbname'])) {
$errors[] = $this->trans->t("Enter the database name for %s", [$this->dbprettyname]);
}
@ -75,7 +75,7 @@ class OCI extends AbstractDatabase {
. ' NLS_LANG=' . getenv('NLS_LANG')
. ' tnsnames.ora is ' . (is_readable(getenv('ORACLE_HOME') . '/network/admin/tnsnames.ora') ? '' : 'not ') . 'readable', 0, $e);
}
throw new \OC\DatabaseSetupException($this->trans->t('Oracle account name and/or password not valid'),
throw new \OC\DatabaseSetupException($this->trans->t('Oracle Login and/or password not valid'),
'Check environment: ORACLE_HOME=' . getenv('ORACLE_HOME')
. ' ORACLE_SID=' . getenv('ORACLE_SID')
. ' LD_LIBRARY_PATH=' . getenv('LD_LIBRARY_PATH')

@ -114,7 +114,7 @@ class PostgreSQL extends AbstractDatabase {
$this->logger->error($e->getMessage(), [
'exception' => $e,
]);
throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL account name and/or password not valid'),
throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL Login and/or password not valid'),
$this->trans->t('You need to enter details of an existing account.'), 0, $e);
}
}

@ -456,7 +456,7 @@ class Manager extends PublicEmitter implements IUserManager {
// Check if user already exists
if ($this->userExists($uid)) {
throw new \InvalidArgumentException($l->t('The account name is already being used'));
throw new \InvalidArgumentException($l->t('The Login is already being used'));
}
/** @deprecated 21.0.0 use BeforeUserCreatedEvent event with the IEventDispatcher instead */
@ -734,27 +734,27 @@ class Manager extends PublicEmitter implements IUserManager {
// Check the name for bad characters
// Allowed are: "a-z", "A-Z", "0-9", spaces and "_.@-'"
if (preg_match('/[^a-zA-Z0-9 _.@\-\']/', $uid)) {
throw new \InvalidArgumentException($l->t('Only the following characters are allowed in an account name:'
throw new \InvalidArgumentException($l->t('Only the following characters are allowed in an Login:'
. ' "a-z", "A-Z", "0-9", spaces and "_.@-\'"'));
}
// No empty username
if (trim($uid) === '') {
throw new \InvalidArgumentException($l->t('A valid account name must be provided'));
throw new \InvalidArgumentException($l->t('A valid Login must be provided'));
}
// No whitespace at the beginning or at the end
if (trim($uid) !== $uid) {
throw new \InvalidArgumentException($l->t('Account name contains whitespace at the beginning or at the end'));
throw new \InvalidArgumentException($l->t('Login contains whitespace at the beginning or at the end'));
}
// Username only consists of 1 or 2 dots (directory traversal)
if ($uid === '.' || $uid === '..') {
throw new \InvalidArgumentException($l->t('Account name must not consist of dots only'));
throw new \InvalidArgumentException($l->t('Login must not consist of dots only'));
}
if (!$this->verifyUid($uid, $checkDataDirectory)) {
throw new \InvalidArgumentException($l->t('Account name is invalid because files already exist for this user'));
throw new \InvalidArgumentException($l->t('Login is invalid because files already exist for this user'));
}
}

Loading…
Cancel
Save