Part of the EllisLab Network
   
1 of 11
1
The Easiest Authentication Library for CodeIgniter just got easier.
Posted: 25 April 2009 05:12 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  349
Joined  05-04-2008

Hey guys,

Over the past few days I have been working hard on adding an administration panel to The Authentication Library.

I have added the ability to add, edit and delete users without writing any code. I have also created a helper to reduce the code you need to write for some other tasks.

I have also changed the location of the user guide to my personal domain name. The user guide can be found here and has been updated for this new 1.0.5 release.

You can download the new set of files from Github.

If you have any questions that are not covered in the user guide, please post here.


Thanks.


(Sorry for the brief post, it’s late here.)

 Signature 

[ Adam Griffiths - Shropshire Based Web Developer ]
[ The Authentication Library User Guide ]
[ Programmers Voice - PHP and CodeIgniter articles, tutorials and screencasts. ]
[ Follow me on Twitter ]

Profile
 
 
Posted: 25 April 2009 05:30 PM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2690
Joined  05-18-2008

Looks really good, have downloaded it, and will dig into it tomorrow smile
It seems to have pretty much what I want, without the additional bloat of the larger libraries

 Signature 

I’m building a Project Management System for my 3rd year Uni project, Sign up to the beta
Track my progress | Post of the day: UI Designs
Get full auto complete support for CodeIgniter in Eclipse

Profile
 
 
Posted: 01 May 2009 11:51 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  3
Joined  05-01-2009

hallo, Adam, I’ve found this in _generate() function in Auth.php:

$token_source = fopen("http://random.org/strings/?num=1&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new", "r");
$token = fread($token_source, 20);

may be to use a more simple solution, like

$sym = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$token ='';
for (
$a = 0; $a < 20; $a++) {
    $token
.= $sym[mt_rand(0, 19)];
}

or I do not understand something?

Profile
 
 
Posted: 02 May 2009 04:47 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  349
Joined  05-04-2008
boxfrommars - 01 May 2009 11:51 PM

hallo, Adam, I’ve found this in _generate() function in Auth.php:

$token_source = fopen("http://random.org/strings/?num=1&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new", "r");
$token = fread($token_source, 20);

may be to use a more simple solution, like

$sym = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$token ='';
for (
$a = 0; $a < 20; $a++) {
    $token
.= $sym[mt_rand(0, 19)];
}

or I do not understand something?

I have taken many of the “rewuirements” of an authentication library “done right” from here. This includes random salt generation from random.org.

I now understand that if a user is using this locally and there is no internet access, an error occurs. I will create a config value that will let you choose whether or not to use random.org for the salts.

Thanks.

 Signature 

[ Adam Griffiths - Shropshire Based Web Developer ]
[ The Authentication Library User Guide ]
[ Programmers Voice - PHP and CodeIgniter articles, tutorials and screencasts. ]
[ Follow me on Twitter ]

Profile
 
 
Posted: 02 May 2009 06:09 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  3
Joined  05-01-2009

Thank you for your reply and for a good library grin

Profile
 
 
Posted: 02 May 2009 11:44 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  26
Joined  03-15-2009

I’m getting the following error on a fresh install of CI:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: email

Filename: pages/register.php

Line Number: 20

When I try and access ‘admin/register’. However, looking at register.php I see that $email is being defined correctly. Any ideas?

Profile
 
 
Posted: 02 May 2009 11:56 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  349
Joined  05-04-2008
Otaku Coder - 02 May 2009 11:44 AM

I’m getting the following error on a fresh install of CI:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: email

Filename: pages/register.php

Line Number: 20

When I try and access ‘admin/register’. However, looking at register.php I see that $email is being defined correctly. Any ideas?

Thanks for letting me know about this. The error was in the file views/auth/pages/register.php - I have now fixed the error and the changes are in the latest commit in the github repo.

Thanks.

 Signature 

[ Adam Griffiths - Shropshire Based Web Developer ]
[ The Authentication Library User Guide ]
[ Programmers Voice - PHP and CodeIgniter articles, tutorials and screencasts. ]
[ Follow me on Twitter ]

Profile
 
 
Posted: 02 May 2009 12:32 PM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  26
Joined  03-15-2009
Adam Griffiths - 02 May 2009 11:56 AM
Otaku Coder - 02 May 2009 11:44 AM

I’m getting the following error on a fresh install of CI:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: email

Filename: pages/register.php

Line Number: 20

When I try and access ‘admin/register’. However, looking at register.php I see that $email is being defined correctly. Any ideas?

Thanks for letting me know about this. The error was in the file views/auth/pages/register.php - I have now fixed the error and the changes are in the latest commit in the github repo.

Thanks.

Just installed the fix and it’s working fine now. Thanks!!

Profile
 
 
Posted: 02 May 2009 12:34 PM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  26
Joined  03-15-2009

I already have a ‘groups’ table in an app I’ve been developing, so I had to rename it in your dump.sql. However, I can’t find any references to that table in the auth code. Is it actually being used or have I just missed it?

Profile
 
 
Posted: 02 May 2009 12:40 PM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  26
Joined  03-15-2009

I seem to be on a Bug Hunt today!!! Here’s another one for you Adam:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: msg

Filename: pages/reg_success.php

Line Number: 5

I get that error after I’ve hit ‘Submit’ on the register view. It says ‘Success’ and the record is inserted correctly in the DB so everything else appears to work fine.

Profile
 
 
Posted: 02 May 2009 12:46 PM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  349
Joined  05-04-2008
Otaku Coder - 02 May 2009 12:34 PM

I already have a ‘groups’ table in an app I’ve been developing, so I had to rename it in your dump.sql. However, I can’t find any references to that table in the auth code. Is it actually being used or have I just missed it?

Yes it’s in there so it can be used in your application, but it’s not directly used in the Library. Although this will change in future versions.

Otaku Coder - 02 May 2009 12:40 PM

I seem to be on a Bug Hunt today!!! Here’s another one for you Adam:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: msg

Filename: pages/reg_success.php

Line Number: 5

I get that error after I’ve hit ‘Submit’ on the register view. It says ‘Success’ and the record is inserted correctly in the DB so everything else appears to work fine.

Thanks, I think I’ve fixed the problem now. Can you download the new Auth.php library file from github and test it on your machine just to be sure?

Thanks.

 Signature 

[ Adam Griffiths - Shropshire Based Web Developer ]
[ The Authentication Library User Guide ]
[ Programmers Voice - PHP and CodeIgniter articles, tutorials and screencasts. ]
[ Follow me on Twitter ]

Profile
 
 
   
1 of 11
1
 
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: 120570 Total Logged-in Users: 39
Total Topics: 126614 Total Anonymous Users: 4
Total Replies: 665614 Total Guests: 352
Total Posts: 792228    
Members ( View Memberlist )