Tank Auth v1.0 (CI authentication library) |
[eluser]Gromozeka[/eluser]
Using corresponding methods of the library: * is_logged_in - check if user authorized on the site. * get_user_id returns user_id if user is authorized on the site, FALSE otherwise. * get_username returns username for authorized user, FALSE otherwise. The method makes sense only if use_username is set to TRUE in config-file; otherwise returns an empty string for every user.
[eluser]jabberjab[/eluser]
Awesome. Thanks again for this library, it works like a charm
[eluser]Gromozeka[/eluser]
U R welcome Please let me know if you'll have any problem with the library.
[eluser]RS71[/eluser]
Sounds promising although in my case I'd need roles & permissions
[eluser]keiser1080[/eluser]
Hello i tri tank auth with postgresql, But i get this error Code: A Database Error Occurred so i dont understand why the sql request contain no data for the field user_data. Mayby the schema.sql is not correct in this version http://konyukhov.com/soft/tank_auth/tank_auth.zip ???
[eluser]Gromozeka[/eluser]
It's strange. I took the session support from native CI code, as it written here: http://ellislab.com/codeigniter/user-gui...sions.html with the same table in DB: Code: CREATE TABLE IF NOT EXISTS `ci_sessions` ( When exactly this SQL error occur?
[eluser]keiser1080[/eluser]
[quote author="Gromozeka" date="1240580059"] with the same table in DB: Code: CREATE TABLE IF NOT EXISTS `ci_sessions` ( thanks for the reply I trie to port tank auth to postgresql. De probleme is, if i go to the page /auth/login/ . Apart of the script do this request Code: INSERT INTO "ci_sessions" ("session_id", "ip_address", "user_agent", "last_activity") VALUES ('fc40d7fc1a67d070866dc3578fdd1d1f', '81.247.128.65', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.', 1240510179) as you can see there is only 4 fields in the sql request. But on the schema there are 5 field for test i have change the schema like this Code: CREATE TABLE IF NOT EXISTS `ci_sessions` ( If you want i can post the schema of the postgresql database.
[eluser]Gromozeka[/eluser]
I tried to google any info about this case, but found nothing. It seems to me that the problem is in PostgreSQL driver for CodeIgniter, in session management. Unfortunately I can't prove it -- there is no PostgreSQL on my hoster's server. Would you test how sessions work on PostgreSQL in your aplication regardless of Tank Auth? Does any similar error occur?
[eluser]keiser1080[/eluser]
[quote author="Gromozeka" date="1240697657"]I tried to google any info about this case, but found nothing. It seems to me that the problem is in PostgreSQL driver for CodeIgniter, in session management. Unfortunately I can't prove it -- there is no PostgreSQL on my hoster's server. Would you test how sessions work on PostgreSQL in your aplication regardless of Tank Auth? Does any similar error occur?[/quote] I think is very dificult to port to postgresql, because postgresql is realy different with mysql for exemple no unix time function in postgresql. For testing i have install mysql to see the demo of tank auth. I can create a account. I recive de mail for validation. I can validate de account. I can login without capcha. I can logout I can login with capcha include thank auth to my aplication? I try like this, tell my if it is correct? Code: class Welcome extends Controller { If it is not possible, can you tell my the way to extend the thank auth with role and or profile for users?
[eluser]Gromozeka[/eluser]
[quote author="keiser1080" date="1240753192"] I try like this, tell my if it is correct? Code: class Welcome extends Controller { If it is not possible, can you tell my the way to extend the thank auth with role and or profile for users?[/quote] Yes, it's correct. Also you can use get_username (or get_user_id) method to identify user when he/she is logged in. Role management isn't supported in this version. I think that role management shouldn't be a part of authorisation library. Maybe there will be an extension for the lib, to manage user rights, give them access to different pages and moderate their profiles... But definitely it is not a direction in which I'm going to develop the library right now. I'd better add OpenId support to extend login options. What about user profiles -- they are supported already. To add new fields to user profile you have to: - add corresponding fields to user_profiles table in database - create a page for editing this data by registered user. This edit page is supposed to be added in next version of the library. |
Welcome Guest, Not a member yet? Register Sign In |