Part of the EllisLab Network
   
3 of 25
3
Tank Auth v1.0 (CI authentication library)
Posted: 19 April 2009 11:44 AM   [ Ignore ]   [ # 21 ]  
Summer Student
Total Posts:  13
Joined  03-25-2009

Awesome. Thanks again for this library, it works like a charm smile

 Signature 

[ upbeat.no - coming soon ]

Profile
 
 
Posted: 19 April 2009 03:52 PM   [ Ignore ]   [ # 22 ]  
Grad Student
Avatar
Rank
Total Posts:  52
Joined  04-07-2009

U R welcome smile Please let me know if you’ll have any problem with the library.

Profile
 
 
Posted: 21 April 2009 10:01 PM   [ Ignore ]   [ # 23 ]  
Lab Assistant
RankRank
Total Posts:  145
Joined  11-21-2008

Sounds promising although in my case I’d need roles & permissions

Profile
 
 
Posted: 23 April 2009 12:38 PM   [ Ignore ]   [ # 24 ]  
Summer Student
Total Posts:  3
Joined  04-23-2009

Hello i tri tank auth with postgresql,
But i get this error

A Database Error Occurred

Error Number
:

ERREUR: une valeur NULL viole la contrainte NOT NULL de la colonne « user_data »

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)

the columns user_data is “`user_data` text COLLATE utf8_bin NOT NULL,” normaly not null,
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 ???

Profile
 
 
Posted: 24 April 2009 03:34 AM   [ Ignore ]   [ # 25 ]  
Grad Student
Avatar
Rank
Total Posts:  52
Joined  04-07-2009

It’s strange. I took the session support from native CI code, as it written here:
http://codeigniter.com/user_guide/libraries/sessions.html
with the same table in DB:

CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(50) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id)
);

When exactly this SQL error occur?

Profile
 
 
Posted: 24 April 2009 09:06 AM   [ Ignore ]   [ # 26 ]  
Summer Student
Total Posts:  3
Joined  04-23-2009
Gromozeka - 24 April 2009 03:34 AM

with the same table in DB:

CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(50) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id)
);

When exactly this SQL error occur?

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

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

CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(50) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text ,
PRIMARY KEY (session_id)
);

that work but i dont know if that change afect the tank auth script???
If you want i can post the schema of the postgresql database.

Profile
 
 
Posted: 25 April 2009 12:14 PM   [ Ignore ]   [ # 27 ]  
Grad Student
Avatar
Rank
Total Posts:  52
Joined  04-07-2009

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?

Profile
 
 
Posted: 26 April 2009 03:39 AM   [ Ignore ]   [ # 28 ]  
Summer Student
Total Posts:  3
Joined  04-23-2009
Gromozeka - 25 April 2009 12:14 PM

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?

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?

class Welcome extends Controller {

    
function Welcome()
    
{
        parent
::Controller();    
        
$this->load->config('tank_auth', TRUE);
        
$this->load->helper(array('form', 'url'));
        
$this->load->library('form_validation');
        
$this->load->library('tank_auth');
        
$this->lang->load('tank_auth');
    
}
    
    
function index()
    
{   
        
if ($this->tank_auth->is_logged_in())  
        
{
            $this
->load->view('welcome_message');
        
}  
         
else  
        
{  
             redirect
('/auth/login/');
        
}  
    }
}

It is possible to manage users role with tank auth ???
If it is not possible, can you tell my the way to extend the thank auth with role and or profile for users?

Profile
 
 
Posted: 28 April 2009 08:21 AM   [ Ignore ]   [ # 29 ]  
Grad Student
Avatar
Rank
Total Posts:  52
Joined  04-07-2009
keiser1080 - 26 April 2009 03:39 AM

I try like this, tell my if it is correct?

class Welcome extends Controller {

    
function Welcome()
    
{
        parent
::Controller();    
        
$this->load->config('tank_auth', TRUE);
        
$this->load->helper(array('form', 'url'));
        
$this->load->library('form_validation');
        
$this->load->library('tank_auth');
        
$this->lang->load('tank_auth');
    
}
    
    
function index()
    
{   
        
if ($this->tank_auth->is_logged_in())  
        
{
            $this
->load->view('welcome_message');
        
}  
         
else  
        
{  
             redirect
('/auth/login/');
        
}  
    }
}

It is possible to manage users role with tank auth ???
If it is not possible, can you tell my the way to extend the thank auth with role and or profile for users?

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. smile

Profile
 
 
Posted: 29 April 2009 09:48 AM   [ Ignore ]   [ # 30 ]  
Summer Student
Avatar
Total Posts:  15
Joined  07-13-2006

Hi!

What would be the best way to localize/change urls when using TankAuth.

I would like to have
http://mydomain.com/auth/login/ changed to http://mydomain.com/konto/zaloguj

I can use routes facility, but Auth class redirects to “auth/*” methods on certain events.
I would like also to keep original code of TankAuth.

Regards,
Maciek

 Signature 

ibex.pl

Profile
 
 
   
3 of 25
3
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120512 Total Logged-in Users: 34
Total Topics: 126580 Total Anonymous Users: 6
Total Replies: 665474 Total Guests: 383
Total Posts: 792054    
Members ( View Memberlist )
Newest Members:  12sarah123CasERispukgendaleOptimizaiofficeiEclipsekinkadebbbBenAbramsasantisteban