Ion Auth - Lightweight Auth System based on Redux Auth 2 |
[eluser]Kinsbane[/eluser]
[quote author="Ben Edmunds" date="1271928688"]Kisbane, I'm still not sure what's up with the identity check but try out the newest code and see if that fixes the login issue. Are you only experiencing this on auto-login or on normal logins as well? Thanks,[/quote] This happens whether or not I'm using auto-login. Did you only change the ion_auth_model.php file? Or the auth.php controller and the Ion_auth.php Library file as well?
[eluser]Kinsbane[/eluser]
Tried the latest ion_auth_model.php file, Ben, and still no joy. Can you comment on my note above in regards to the query being generated and how it's incorrect? It's not using a table to SELECT FROM at all, even with the final chained method being get($this->tables['users'])
[eluser]Kinsbane[/eluser]
Ok, some more developments. After switching to a standard string query for the identity check, I did the same for the Model's login() function: Code: $query = $this->db->query("SELECT email, id, password, group_id FROM ".$this->tables['users']." WHERE ".$this->identity_column." = '".$identity."' AND active = 1 LIMIT 0, 1"); This produces the following error, which tells me that the functions are not receiving the class's properties: Quote:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE = 'admin@admin.com' AND active = 1 LIMIT 0, 1' at line 1 So after that, I changed the query to this: Code: $query = $this->db->query("SELECT email, id, password, group_id FROM users WHERE email = '".$identity."' AND active = 1 LIMIT 0, 1"); And now the error I have is: Quote:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `0` = 'admin@admin.com' LIMIT 1' at line 2 Now, let me just ask - is this a problem with the Ion Auth code? Or is it something else, maybe with my PHP setup? before I decided to upgrade, Ion Auth was working just fine - I was initially loathe to upgrade, but after reading through this thread and all the upgrades provided, it did just fine. If I or someone else are the only ones having these issues, it stands to reason it is something with our setup and not with the code. But this is what I have found.
[eluser]Kinsbane[/eluser]
I would also like to report, if it helps, that the variables defined in the __construct method are not carrying over to the other methods in the ion auth model class. $this->tables, $this->columns, $this->identity_column, etc, etc, are not returning any values. Edit: to correct above, they are returning "false".
[eluser]Kinsbane[/eluser]
Well, I'm at a loss. After changing all relevant queries to string-based ones, instead of using AR, the login function spits me back to the login form and tells me the login is incorrect, when it isn't. And now it appears I have lost my old files and now I have a non-working auth library. ![]()
[eluser]Ben Edmunds[/eluser]
Kinsbane, I did a ton of testing today and everything seems to be working for me. Can you give my standard project on github and run through and see if you can reproduce these issue? http://github.com/benedmunds/CodeIgniter...rd-Project I appreciate the troubleshooting dude!
[eluser]Kinsbane[/eluser]
Hi Ben, I downloaded your sammple CI project and installed it on my server: http://www.kinsbane.net/benedmunds/index.php and tried logging in and all that good stuff, everything appears to be working well there. Now to try it on the work server and see what happens! PS: before I installed your sample CI project, I made a different, fresh install of CI and the files from your Ion Auth Github - this, too, errored out, although the program kept telling me that I had an incorrect login, even though I was using the admin@admin.com/password stuff.
[eluser]Kinsbane[/eluser]
Okay Ben, Got some updates. I copied the ion_auth files over from your CI sample project and had to make some adjustments to certain things like view files and such, but I got them copied over and was able to login the first time without remembering me turned on. Then I went to the ion_auth.php config file and changed store salt value to true, tried logging in, it just kept returning me to the auth/login controller method, regardless if I had remember me turned on or not. I changed the config file value store_salt back to false and brought over the original hashed string for 'password' and tried logging in again and I got the login successful message. Why would storing the salt be used and why would it mess up the login process if it's set to true?
[eluser]Ben Edmunds[/eluser]
Kinsbane, If you turn on the stored salt you have to input the salt into the user field. The salt to use is in the config file. |
Welcome Guest, Not a member yet? Register Sign In |