![]() |
Tank Auth v1.0 (CI authentication library) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Tank Auth v1.0 (CI authentication library) (/showthread.php?tid=17515) |
Tank Auth v1.0 (CI authentication library) - El Forum - 05-07-2009 [eluser]RaZoR LeGaCy[/eluser] that worked thanx Will look deeper into the code Tank Auth v1.0 (CI authentication library) - El Forum - 05-12-2009 [eluser]theshiftexchange[/eluser] can someone explain why the user and user profile tables are separate? Why not just merge them into one table for simplicity? Tank Auth v1.0 (CI authentication library) - El Forum - 05-12-2009 [eluser]Gromozeka[/eluser] Users table contains data that are necesary for user authentication and for normal library work. It's highly recommended do not touch it. User_profiles table contains mock-up for user profile. You are free to modify it, delete existing datafields or add your own, depending on the project needs. Tank Auth v1.0 (CI authentication library) - El Forum - 05-12-2009 [eluser]theshiftexchange[/eluser] Thanks. I've successfully (and VERY easily) configured Tank Auth to work on my current site (including Captcha). Its awesome! A quick question about the 'correct' way to implement this. As I make more pages that are going to be only available to a logged in user - should I just make a base controller such as: Code: class MY_Controller extends Controller and have all controllers which require a logged in user to 'extend' this? Or is there another/better way? p.s. one suggestion for the next version: add a 'login_count' to the user profile? Tank Auth v1.0 (CI authentication library) - El Forum - 05-12-2009 [eluser]Gromozeka[/eluser] Thank you for using Tank Auth. I guess that described check for login in constructor will work fine for controllers where all methods require users to be logged in. But to be honest, I never did it this way (I do check for login in every method). ![]() What is 'login_count' field for? If you mean counting login attempts then there is another table for this purpose: "login_attempts". Tank Auth v1.0 (CI authentication library) - El Forum - 05-12-2009 [eluser]theshiftexchange[/eluser] [quote author="Gromozeka" date="1242159356"] What is 'login_count' field for? If you mean counting login attempts then there is another table for this purpose: "login_attempts".[/quote] I meant as a count for the number of successful logins a user has had. This would allow me to track the usage of my site by user. i.e. I could run queries stating how many users have logged in more than twice to my site, allowing me to test the ability to have customers return to my site. Its not a big deal, just thought it would be useful. edit: I'm aware that I could either create a field in user_profile (but its not the most logical spot for it), or just modify the users table (but then if you release upgrades its a tad bit harder for me to manage). Tank Auth v1.0 (CI authentication library) - El Forum - 05-13-2009 [eluser]Gromozeka[/eluser] Err... If you prefer to count number of successful logins, then I agree that 'user_profiles' is not a best place to keep it. The good practice is to add an integer field to 'users' table (with 0 as default value) and update it by calling '$this->db->set(...)' in 'update_login_info' method of 'Users' model. Here you will count both normal logins and auto-logins too. PS: Would it be simpler to analyze usage of your site with Google Analytics? Tank Auth v1.0 (CI authentication library) - El Forum - 05-15-2009 [eluser]RaZoR LeGaCy[/eluser] Can you include support for logins with Google ID --> OAuth?? Tank Auth v1.0 (CI authentication library) - El Forum - 05-15-2009 [eluser]Gromozeka[/eluser] Do you mean OpenID authorization? Well, I'm planning to do it, but have no idea when it will be implemented. ![]() Lack of time. Tank Auth v1.0 (CI authentication library) - El Forum - 05-15-2009 [eluser]RaZoR LeGaCy[/eluser] yes http://www.programmableweb.com/api/google-openid |