Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions settings/js/users/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,21 +1048,6 @@ $(document).ready(function () {
}));
return false;
}
if ($.trim(password) === '' && !$('#CheckboxMailOnUserCreate').is(':checked')) {
OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
message: t('settings', 'A valid password must be provided')
}));
return false;
}
if (!$('#CheckboxMailOnUserCreate').is(':checked')) {
email = '';
}
if ($('#CheckboxMailOnUserCreate').is(':checked') && $.trim(email) === '') {
OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
message: t('settings', 'A valid email must be provided')
}));
return false;
}

var promise;
if (UserDeleteHandler) {
Expand Down
2 changes: 1 addition & 1 deletion settings/templates/users/part.userlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
autocomplete="off" autocapitalize="none" autocorrect="off" />
</td>
<td class="password">
<input id="newuserpassword" type="password" required
Copy link
Member Author

@skjnldsv skjnldsv Feb 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required, already handled by server and generated if email is valid

if ($password === '') {
if ($email === '') {
return new DataResponse(
[
'message' => (string)$this->l10n->t('To send a password link to the user an email address is required.')
],
Http::STATUS_UNPROCESSABLE_ENTITY
);
}
$password = $this->secureRandom->generate(30);
// Make sure we pass the password_policy
$password .= $this->secureRandom->generate(2, '$!.,;:-~+*[]{}()');
$generatePasswordResetToken = true;
}

<input id="newuserpassword" type="password"
placeholder="<?php p($l->t('Password'))?>" name="password"
autocomplete="new-password" autocapitalize="none" autocorrect="off" />
</td>
Expand Down