Welcome Guest, Not a member yet? Register   Sign In
Community auth: problem with login
#8

(07-30-2017, 08:51 AM)skunkbad Wrote: First, I cannot be reached via private message (PM). All support should be open and public, so that other people can learn from your mistakes. I have not yet looked at your files, because you added more information, and it looks like we might be able to get somewhere without me doing that.

The hidden input for the login token is added in MY_form_helper.php, in the function form_open. If you use form_open, it should automatically add the hidden input for you. This is also the case with CI's CSRF token, which is why I added the token to the form_open function. If you create your form open tag in some other fashion, then you have to manually add the token.

Sessions are already "autoloaded" for you if you use Community Auth. This is done in core/Auth_Controller.php. It is done in the _load_dependencies method. So if your controllers extend MY_Controller, which then extends Auth_Controller, sessions are already autoloaded. So, your controllers should begin with:


PHP Code:
class <Your class name> extends MY_Controller 

So, please do not attempt to autoload the sessions, unless you are generating pages that will not be using Community Auth.

Make those changes and test everything. If you still have problems then put a fresh copy of your files/DB in the download, and let me know.

Thank you very much for the information, I didn't know that my controllers should extends MY_Controller instead of CI_Controller to fully use Community-Auth until I read your post. Removing the session from the CI autoload made the code working again.

Again, thank for the great support.
Reply


Messages In This Thread
Community auth: problem with login - by Giba - 07-04-2017, 04:28 PM
RE: Community auth: problem with login - by Sten - 07-29-2017, 08:50 PM
RE: Community auth: problem with login - by Sten - 07-29-2017, 10:10 PM
RE: Community auth: problem with login - by Sten - 07-29-2017, 09:55 PM
RE: Community auth: problem with login - by Sten - 07-30-2017, 07:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB