ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

The Easiest Authentication Library for CodeIgniter just got easier.

April 25, 2009 7:12pm

Subscribe [37]
  • #1 / Apr 25, 2009 7:12pm

    Adam Griffiths

    316 posts

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

  • #2 / Apr 25, 2009 7:30pm

    Dam1an

    2385 posts

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

  • #3 / May 02, 2009 1:51am

    boxfrommars

    3 posts

    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?

  • #4 / May 02, 2009 6:47am

    Adam Griffiths

    316 posts

    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.

  • #5 / May 02, 2009 8:09am

    boxfrommars

    3 posts

    Thank you for your reply and for a good library 😊

  • #6 / May 02, 2009 1:44pm

    Otaku Coder

    22 posts

    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?

  • #7 / May 02, 2009 1:56pm

    Adam Griffiths

    316 posts

    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.

  • #8 / May 02, 2009 2:32pm

    Otaku Coder

    22 posts

    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!!

  • #9 / May 02, 2009 2:34pm

    Otaku Coder

    22 posts

    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?

  • #10 / May 02, 2009 2:40pm

    Otaku Coder

    22 posts

    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.

  • #11 / May 02, 2009 2:46pm

    Adam Griffiths

    316 posts

    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.

    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.

  • #12 / May 02, 2009 2:55pm

    Otaku Coder

    22 posts

    Installed the new Auth.php and I can’t see any other errors for now. Thanks!!! Another question, is the Dashboard view supposed to be empty? All I see is ‘This is the admin section.’.

  • #13 / May 02, 2009 3:00pm

    Adam Griffiths

    316 posts

    Installed the new Auth.php and I can’t see any other errors for now. Thanks!!! Another question, is the Dashboard view supposed to be empty? All I see is ‘This is the admin section.’.

    No worries.

    The dashboard should say “welcome $username” where $username is the username of the user. “This is the admin section” was in the old admin controller, have you updated to the new admin controller? There are 2 now, in a directory controllers/admin/.

    Thanks.

  • #14 / May 02, 2009 3:19pm

    Otaku Coder

    22 posts

    The dashboard should say “welcome $username” where $username is the username of the user. “This is the admin section” was in the old admin controller, have you updated to the new admin controller? There are 2 now, in a directory controllers/admin/.

    Thanks.

    I have updated to the new admin controller and I can’t see anything other than ‘This is the admin section’.

  • #15 / May 03, 2009 2:40pm

    spmckee

    56 posts

    I’m getting the same thing: “This is the admin section”

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases