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.

Ion Auth - Lightweight Auth System based on Redux Auth 2

February 10, 2010 7:00pm

Subscribe [287]
  • #1261 / Jul 28, 2012 4:35am

    rei

    67 posts

    Hi, does anyone here got a pre setup HMVC modular extensions + Ion Auth library CodeIgniter. Or does anyone here got an idea how would I integrate Ion Auth with HMVC modular extension.

  • #1262 / Jul 28, 2012 5:25pm

    rip_pit

    88 posts

    Yeah whats the story with how Ion_Auth stores IP addresses? I was surprised that it seem to store them as raw number instead of a string that I can more easily search/deal with.

    Also, does Ion_Auth generate the documentation at http://benedmunds.com/ion_auth/ with a tool or is it just typed out as a HTML document? I’d like to work on the documentation but I’m not sure if I should embed it in the code or edit the docs directly.

    i don’t know how IA doc is made but you could look at http://manual.phpdoc.org/HTMLframesConverter/default/ to build docs based on your code

  • #1263 / Aug 04, 2012 9:27am

    RockyS

    9 posts

    First I must say thank you for this awesome module!

    Secondly I have a question, is there any way I can protect whole define page (ex: url/index.php/admin) without writing
    if (!$this->ion_auth->logged_in())
      {
    redirect('user/login');
    }
      elseif (!$this->ion_auth->is_admin())
      {
    //redirect them to the home page because they must be an administrator to view this
    redirect($this->config->item('base_url'), 'refresh');
    }
    in every controller that loads views?

  • #1264 / Aug 04, 2012 12:17pm

    Mirge

    250 posts

  • #1265 / Aug 08, 2012 5:27pm

    sevengraff

    5 posts

    How do I change the groups that a registered user is in? update() just takes a $data array but only updates the user table, not the users_groups table. Also, there is a get_users_groups() but no corresponding set_users_groups().
    The docs list both update_user() and update() but I only see an implementation for update().

    edit
    Oh there is an undocument function, add_to_group( $groupid, $userid ) that will do it. Super cool, just found it in the model, gonna play around with it.

  • #1266 / Aug 13, 2012 7:07am

    RockyS

    9 posts

    This should help: http://philsturgeon.co.uk/blog/2010/02/CodeIgniter-Base-Classes-Keeping-it-DRY

    I tried with this one
    http://jondavidjohn.com/blog/2011/01/scalable-login-system-for-codeigniter-ion_auth

    but it’s not working anymore and github contains only basic stuff without extended controller etc.
    Also tutorial is a little mess, it contains Admin_Controller where it’s saying “create MY_Controller.php” etc.

    Does anyone have working version of how to protected pages or load user informations into object $the_user which would contain all user information with GROUP included? Because I couldn’t find none.

    I really don’t like to copy/paste 10 lines of code to each controller.

  • #1267 / Aug 14, 2012 8:38am

    ZaLiTHkA

    29 posts

    ...I setup [ip_address] with a data type of varbinary(16).

    Just to update my issue… I just got some help from a friend of mine who’s had a lot more experience in SQL than I have, and we got this sorted. Apparently I was using the incorrect data type for the [ip_address] column, after changing from varbinary(16) to varchar(16), it seems to be working properly now. 😊

  • #1268 / Aug 15, 2012 9:53pm

    SP1966

    3 posts

    Im running into the following error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE `0` = ‘[email protected]’ LIMIT 1’ at line 2

    SELECT `username`, `email`, `id`, `password`, `active`, `last_login` WHERE `email` = ‘[email protected]’ LIMIT 1

    Why is there no FROM in this SQL???

  • #1269 / Aug 20, 2012 9:02am

    Jonny_Azores

    1 posts

    Hi all!

    First of all Congratz for Ben and all the users on keeping Ion Auth one of the best authentication i’ve tried.

    Now to my only question. After a lot of tries, i wasnt able to find a “simple” way of list all users in a group. I can list all users, but can’t get only admins or members.
    I wanted to paginate a table with all members listed.


    Thank your very much.

  • #1270 / Aug 30, 2012 10:04am

    dannie_manji

    1 posts

    I kind of broke my site with this, and was wondering if anyone knows what to do. 

    I have installed Ion_Auth into my site to replace a simple login I made from a tutorial video.  The install worked and I began the process of converting the site to use Ion_Auth, so teacher/student and admin pages are protected by groups now, and logging in works from [http://localhost/example/auth/login]

    The problem comes from trying to make logging in from the site main page instead of auth/login page.  When I try to load the auth/login view into site.php, it gives me these error messages when I access the site:


    A PHP Error was encountered

    Severity: Notice

    Message: Undefined variable: message

    Filename: auth/login.php

    Line Number: 7

    Email/Username:
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined variable: identity

    Filename: auth/login.php

    Line Number: 13

    Password:
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined variable: password

    Filename: auth/login.php

    Line Number: 18


    My front page is created by site.php, and auth.php is a separate controller.  I tried copy/pasting auth.php into site.php, but that didn’t seem to work.  (My logic being that everything should be defined auth.php)  I am still fairly new to codeigniter and therefore this may just be some n00bish mistake I’m overlooking.

    ======================================================================================
    EDIT:  Ok, I solved the problem, it was indeed a simple n00bish mistake.
    I had simply forgot to route the form in my login_view properly.  My old form_open linked to admin.php which handled the login process, but I only changed it to form_open(‘auth’) instead of form_open(‘auth/login’).  I figured I would leave this post here for any others that get stuck by anything similar.

    i’m having the same errors, have checked everything is fine. the problems starts whenever i try to load multiple views check it here http://ellislab.com/forums/viewthread/223489/

  • #1271 / Aug 30, 2012 10:16am

    damemi

    1 posts

    After installing ion auth, I get a CI error saying I must set an encryption key to use the session class. When I set the key, however, I get a php 500 error on each page load. What could be the cause of this? How should I have my codeigniter/database configured from a fresh install?

  • #1272 / Aug 31, 2012 6:10pm

    rip_pit

    88 posts

    After installing ion auth, I get a CI error saying I must set an encryption key to use the session class. When I set the key, however, I get a php 500 error on each page load. What could be the cause of this?

    I think it could be related to your hosting and not to CI or ion auth.
    Read http://www.cyberciti.biz/tips/http-error-500-internal-server-for-php-pages-and-solution.html

    How should I have my codeigniter/database configured from a fresh install?

    see configuration @ http://ellislab.com/codeigniter/user-guide/database/index.html

  • #1273 / Sep 26, 2012 11:00am

    Andy78

    91 posts

    I am returning a list of users with the following:

    $users = $this->ion_auth->users(1)->result();

    then using a foreach loop in the view to echo out the fields for each user.

    But I would like to check if each individual user is currently logged in or not and there does not seem to be a simple built in way of doing this with Ion auth.

    I am using database sessions and I know its probably just a matter of querying the ci sessions table but Im not sure. Has anybody done this already? or is there some simple modifications I can make to ion auth that would make this easy?

  • #1274 / Oct 10, 2012 3:19pm

    digital_frog

    14 posts

    I’ve been using Ion_Auth on my website and it’s working beautifully so far, I’m just a little lost as to how the email activation works.  I found in the documentation a way to enable email activation as something necessary to register, but I couldn’t find anything on how it’s implemented.  Does anyone have any experience with how Ion_Auth’s email avtivation works?

  • #1275 / Oct 13, 2012 6:19pm

    rip_pit

    88 posts

    at registration IA creates a uniqid for the user/email,
    ID is stored in DB, and then an activation link containing the ID is sent by email

    The activation link will execute verification process, the ID in the activation url must matches the one in DB.
    If match then user/email will be verified and allowed.

    is that what you asked for ?

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

ExpressionEngine News!

#eecms, #events, #releases