Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in user creation with initial password #1030

Merged
merged 1 commit into from
Sep 5, 2019
Merged

Fix typos in user creation with initial password #1030

merged 1 commit into from
Sep 5, 2019

Conversation

rwos
Copy link
Contributor

@rwos rwos commented Sep 2, 2019

Not sure if I picked the right base branch, let me know :)

This fixes some (I guess) typos in #1017 such that it actually works (on my machine™️).

issue: #764

@amosfolz
Copy link
Contributor

amosfolz commented Sep 2, 2019

Good catch. Looks like I missed that line when I updated it in acf4d60.

@rwos
Copy link
Contributor Author

rwos commented Sep 2, 2019

with the test failure, I'm not so sure anymore if this was actually the correct fix...

@amosfolz
Copy link
Contributor

amosfolz commented Sep 2, 2019

I think the test may need to be adjusted, as before it assumed there was never a password field to handle.

@lcharette
Copy link
Member

$schema->set('value.validators.length.min', $config['site.password.length.min']);
$schema->set('value.validators.length.max', $config['site.password.length.max']);

@@ -167,7 +167,7 @@ public function create(Request $request, Response $response, $args)
$passwordRequest = $this->ci->repoPasswordReset->create($user, $config['password_reset.timeouts.create']);

// If the password_mode is manual, do not send an email to set it. Else, send the email.
if (!isset($data['value'])) {
if ($data['password'] === '') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test failure was actually due to the isset here - it's set to empty string if not set some lines earlier.

@amosfolz
Copy link
Contributor

amosfolz commented Sep 5, 2019

Not sure if I picked the right base branch, let me know :)

This fixes some (I guess) typos in #1017 such that it actually works (on my machine™️).

issue: #764

Just a note, it would be helpful to include some details about what's actually broken for others to be able to tell what exactly this is fixing. :-) "Such that it actually works" is not very helpful.

@lcharette lcharette changed the base branch from develop to hotfix September 5, 2019 23:00
@lcharette lcharette merged commit 4f3f192 into userfrosting:hotfix Sep 5, 2019
@rwos rwos deleted the fix-user-pw-creation branch September 6, 2019 14:29
@rwos
Copy link
Contributor Author

rwos commented Sep 6, 2019

@amosfolz sure, sorry about that - for the record, the problem was that the frontend validation wouldn't allow entering a password, because it always failed the check against the password confirmation field.

@rwos rwos mentioned this pull request Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants