Skip to content

#634#677

Merged
joshi1983 merged 5 commits intohhaccessibility:masterfrom
M4ttoF:634
Aug 9, 2018
Merged

#634#677
joshi1983 merged 5 commits intohhaccessibility:masterfrom
M4ttoF:634

Conversation

@M4ttoF
Copy link
Copy Markdown
Collaborator

@M4ttoF M4ttoF commented Aug 7, 2018

Addresses #634
Redirects from signup button now.

if (Input::has('after_signup_redirect')) {
$confirmationLink.='?after_signup_redirect=/add-location';
}
echo($confirmationLink);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Controllers shouldn't echo anything when they're ready to merge. Feel free to troubleshoot temporarily with echo statements but that isn't suitable for the master branch.

]);

}
else{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did you run 'composer all'? I have a feeling that else statement would fail the coding style tests.


public function confirmEmail($user_email, $email_verification_token)
{
$after_signup_redirect = Input::get('after_signup_redirect');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like that you're getting the redirect value from input here but it looks like you're ignoring it everywhere else which could lead to bugs.

When signing up without the add-location redirect, does it correctly stay on the profile or does it incorrectly redirect to add-location?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just tested it and it works properly. The way signup is setup right now is that it sends you to a page which then tells you to sign in and not to your profile after you click the confirmation link. The button that tells you to sign in will send you to the profile unless the redirect is there

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of hardcoding the /add-location in the redirect below, you should use $after_signup_redirect. If anyone later passes a different URL segment to confirmEmail, it should redirect there instead of /add-location.

Something like this:

'redirect' => '/signin?after_signin_redirect=' . $after_signup_redirect


public function confirmEmail($user_email, $email_verification_token)
{
$after_signup_redirect = Input::get('after_signup_redirect');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of hardcoding the /add-location in the redirect below, you should use $after_signup_redirect. If anyone later passes a different URL segment to confirmEmail, it should redirect there instead of /add-location.

Something like this:

'redirect' => '/signin?after_signin_redirect=' . $after_signup_redirect

@M4ttoF
Copy link
Copy Markdown
Collaborator Author

M4ttoF commented Aug 8, 2018

@joshi1983 updated the PR

@joshi1983 joshi1983 merged commit baf2110 into hhaccessibility:master Aug 9, 2018
return view('pages.signup.success', [
'confirmmessage' => 'Your email has been confirmed.',
'can_sign_in' => true,
'redirect' => '/signin?after_signin_redirect='.$after_signin_redirect
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It should be $after_signup_redirect instead of $after_signin_redirect. This causes a bug that I'll fix in a new pull request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pull request #683 fixed it. It was merged and deployed to https://app.accesslocator.com.

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.

2 participants