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]
  • #61 / May 18, 2009 2:34am

    XonnoX

    3 posts

    The user_group() function checks for a variable called group_id but it was initiated as group. I’m not sure which one of the two is wrong though but group_id made more sense since that is the name used for the field in the database.

    Thanks. After making the changes you suggested, and updating the helper file, everything works just fine now.
    I looked around in the library file before, perhaps maybe there was a typo, but I didn’t catch that. Good eye.

  • #62 / May 20, 2009 7:22pm

    shenanigans01

    36 posts

    Is there anyway to adjust the logout function so that when the user has successfully logged out it doesn’t still show the Dashboard / Logout links… I notice after the logout you have to refresh the page before there gone.

  • #63 / May 20, 2009 11:28pm

    North2Alaska

    58 posts

    I’m just getting started with Ci and this library (EAL?).  I’m coming from a PHPLib environment (very old school) and am struggling some to wrap my head around all there is to learn in a very short time.

    My question is about installation.  After reading the docs, I see that I am to a “New database” with a “user” table.  If I already have a database and a user table (some of the same columns but not all), what is your recommendation?  Should I in fact create a new database or should I modify my existing user table to meet the needs of EAL?

  • #64 / May 20, 2009 11:30pm

    Thorpe Obazee

    1138 posts

    My guess is that you should just modify it to fit the Auth library. But of course, as long as it works it should be fine.

  • #65 / May 20, 2009 11:37pm

    North2Alaska

    58 posts

    I have the email address in another normalized table to capture multiple email addresses.  Could the user table be a view?  Or how best to handle the multiple tables?

  • #66 / May 21, 2009 6:35pm

    North2Alaska

    58 posts

    I think I have things configured correctly.  I am able to register a user, but no mater what I try, username or email address it will not log me in.  I keep getting

    “An Error Was Encountered
    The username and password did not match our records, please try again.”

    As I am still trying to figure out the whole MCV model, I am not sure where to look to see where it is going wrong.  Please help me take baby steps…  😊

  • #67 / May 22, 2009 7:56am

    North2Alaska

    58 posts

    I figured out the problem.  I was converting my old users table to the new structure and missed changing the password length.  I has it set to 35 and it needed to be 255.  So, part of the password was being truncated.  I am now up and running.

  • #68 / May 22, 2009 8:48am

    North2Alaska

    58 posts

    Adam, it looks like a bug in line 26 of auth_helper.php.  The line reads:

      if($system_group === $CI->session->userdata(‘group’))

    I believe it should be:

      if($system_group === $CI->session->userdata(‘group_id’))

    as group_id is the value stored in the session.

  • #69 / May 22, 2009 8:54am

    Adam Griffiths

    316 posts

    Adam, it looks like a bug in line 26 of auth_helper.php.  The line reads:

      if($system_group === $CI->session->userdata(‘group’))

    I believe it should be:

      if($system_group === $CI->session->userdata(‘group_id’))

    as group_id is the value stored in the session.

    Thanks for letting me know. I actually fixed this a couple of days ago in the latest commit to Github.


    Thanks.

  • #70 / May 22, 2009 12:29pm

    North2Alaska

    58 posts

    I like the time out feature that requires you to log back in if you have been idle.  When I have a view that is protected by if (logged_in(() and timed out, how do I get the login to pop up, validate my credentials and then continue with the view I had previously attempted?

  • #71 / May 22, 2009 12:34pm

    Adam Griffiths

    316 posts

    I like the time out feature that requires you to log back in if you have been idle.  When I have a view that is protected by if (logged_in(() and timed out, how do I get the login to pop up, validate my credentials and then continue with the view I had previously attempted?

    The Authentication Library doesn’t actually do this yet. You could make it so that when the login box comes up after a timeout, you would pass the name of the view to load in the first parameter to login(). I’ll implement this for the next “big update”.


    Thanks,


    Adam.

  • #72 / May 22, 2009 12:34pm

    North2Alaska

    58 posts

    Sorry for my premature post.  :-(  It helps to “Study” the documentation rather than just skim it.  Nice work.

  • #73 / May 22, 2009 1:41pm

    North2Alaska

    58 posts

    The Authentication Library doesn’t actually do this yet. You could make it so that when the login box comes up after a timeout, you would pass the name of the view to load in the first parameter to login(). I’ll implement this for the next “big update”.

    This is the index function in the output controller.  Here is what I am doing:

    function index()
      {
    if(logged_in())
    {

    $this->load->view('mobile/header');
    }
          else
          {
    $this->auth->login('output');
    }
      }

    I will put something like this in each function of each controller.  Shouldn’t this accomplish what I’m trying to do?

  • #74 / May 22, 2009 1:55pm

    Adam Griffiths

    316 posts

    Yes that’s exactly it.

  • #75 / May 24, 2009 1:57am

    jbawarren

    22 posts

    GREAT AUTH PACKAGE!

    Potential concern with gethub (or whatever it is that you’re using) though.

    I just downloaded the latest and greatest and the group/group_id issue in the helper still exists. I know its not top priority, but maybe the problem is with gethub?

    I dunno, but you should be aware.

    I’m digging through your stuff now and so far its great. Thanks for your efforts! cant wait for ACL.

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

ExpressionEngine News!

#eecms, #events, #releases