Skip to content
World Wide Web Server edited this page Jul 4, 2012 · 16 revisions

Category:Libraries:Authorization

After pulling my hair out in frustration with the state of some of the User Authorization libraries available for Code Igniter, I decided to write my own.

Download: File:Users_0.5.zip

Place the Users.php file inside of your system/application/library/ folder.

You also need the Db_session library installed.

Use this SQL in your database. [code] CREATE TABLE users ( id int(11) NOT NULL auto_increment, username varchar(25) NOT NULL default '', email varchar(100) NOT NULL default '', fname varchar(25) NOT NULL default '', lname varchar(25) NOT NULL default '', addr varchar(255) NOT NULL default '', city varchar(25) NOT NULL default '', state varchar(25) NOT NULL default '', country varchar(25) NOT NULL default '', zip int(11) NOT NULL default '0', timezone int(11) NOT NULL default '0', isadmin tinyint(1) NOT NULL default '0', password varchar(255) NOT NULL default '', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; [/code]

Clone this wiki locally