Welcome Guest, Not a member yet? Register   Sign In
CommunityAuth Register?
#1

Hi Brian,

My site,
http://www.codesmastery.com/login?redirect=

It is using Community Auth.
Why is it when I try to press the register button. It will not redirect properly into the right url.?
This only happens when I'm log out, but when I'm login as admin for example it redirects me properly into this URL below,
http://www.codesmastery.com/front/register_form
How to fix this.


Thanks in advance brian.
Reply
#2

Take a look at the query string, and how Community Auth is creating the redirect. Any time I click on a link on your website (with the exception of your suggestion page), I am presented with the login form, and the ?redirect is properly set to let the user return to the page they were trying to access.

When you go to your home page, the ridirect is blank. If you intend for the redirect to point somewhere else, you're going to want to change the default login redirect in config/authentication.php. See this line:

Code:
$config['default_login_redirect'] = '';

This is show in the documentation here:
http://community-auth.com/documentation/...cation-php

PS. I've now been hired to do work as an Android app developer, so I have even less time to answer questions. Please be patient, but I will come here and answer questions at least once a day.
Reply
#3

(This post was last modified: 07-27-2016, 10:48 AM by iridion2015.)

I tried this below,

$config['default_login_redirect'] = 'front/register_form';

And I then clicked the 'register' button.

Nothing happened the result is the same, the register form is not displaying only the login form.
Reply
#4

Well, sorry I hadn't really thought about exactly what you are trying to do. I think the problem is that you are trying to authenticate the register_form. If you think about it, you can't require authentication on register_form because if the site visitor doesn't have an account they need to register, but they can't register because they aren't logged in. Trying removing the requirement to authentication from register_form.
Reply
#5

no worries, I solved the problem.
I just move the codes to another controller.
problem solved.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB