Welcome Guest, Not a member yet? Register   Sign In
ErkanaAuth: A non-invasive user authentication library
#8

[eluser]xwero[/eluser]
My first impression

- The try login snippet needs array() around the array content

- what is the point of the helper functions? They are just wrappers for the library methods. Do they work when the library isn't loaded, i think not but maybe i'm wrong. So the only reason why there are helper functions is to lessen the typing?

- using php4 calling the try_login method gives following error
Quote:Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: database/DB_active_rec.php
Line Number: 62

I build the query and i discovered removing the limit en offset from the getwhere method did the trick.

- in the getRole method why do you use and explicit join
Code:
$this->CI->db->select('roles.name');
$this->CI->db->JOIN('roles', 'users.role_id = roles.id');
$query = $this->CI->db->getwhere('users', array('users.id'=>$this->CI->session->userdata('user_id')), 1, 0);
Don't other databases know implicit joins?
Code:
$this->CI->db->select('roles.name');
$query = $this->CI->db->getwhere('users,roles', array('users.role_id' => 'roles.id','users.id'=>$this->CI->session->userdata('user_id')), 1, 0);

- I'm wondering how the class would handle content that is visible for different roles
Code:
<? if (getRole() == 'admin' || getRole() == 'test' || getRole() == 'test2') { ?>
    <li>&lt;?= anchor('admin/users', 'Users'); ?&gt;</li>
  &lt;? } ?&gt;
This can get messy.

Maybe i'm coming on a bit too strong but i think this is good stuff so it can accept a little criticism Smile


Messages In This Thread
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-23-2007, 06:58 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 12:28 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 12:35 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 01:46 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 06:41 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 10:17 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 11:22 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 01:51 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 03:54 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 04:27 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 05:25 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 10-24-2007, 09:00 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 09:46 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 09:47 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 09:53 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 09:58 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 10:01 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 10:04 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 10:13 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-08-2007, 10:35 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-10-2007, 07:11 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-11-2007, 12:01 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-13-2007, 03:59 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-15-2007, 06:16 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-15-2007, 07:06 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-15-2007, 07:22 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-15-2007, 07:32 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-15-2007, 09:24 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-15-2007, 09:24 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-21-2007, 05:25 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-21-2007, 10:58 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-22-2007, 04:49 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-23-2007, 04:55 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-24-2007, 09:39 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-24-2007, 10:35 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-24-2007, 12:06 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-24-2007, 02:32 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-26-2007, 12:20 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-26-2007, 12:40 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 11-26-2007, 12:58 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 01:25 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 01:41 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 01:49 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 01:55 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 02:01 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 02:11 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 02:24 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 02:33 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-03-2007, 04:08 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-05-2007, 10:35 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 12-05-2007, 10:45 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-01-2008, 08:38 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-11-2008, 06:04 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-12-2008, 02:14 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 09:32 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 09:39 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 09:46 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 11:05 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 11:12 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 11:17 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 11:35 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 11:57 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-13-2008, 01:29 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 09:07 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 12:43 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 01:03 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 01:12 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 01:49 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 03:28 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2008, 03:45 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-16-2008, 07:12 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-16-2008, 10:02 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-16-2008, 10:09 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-18-2008, 05:02 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-18-2008, 10:29 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-21-2008, 08:54 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-21-2008, 12:00 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-28-2008, 11:54 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-28-2008, 02:08 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-28-2008, 11:08 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-30-2008, 03:05 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 02-02-2008, 05:55 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 02-05-2008, 03:50 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 02-07-2008, 07:34 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 03-27-2008, 04:03 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 04-09-2008, 11:53 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 04-09-2008, 11:57 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 04-28-2008, 09:03 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 04-29-2008, 01:02 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 04-30-2008, 02:28 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 05-13-2008, 07:12 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 05-13-2008, 07:23 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 05-13-2008, 07:33 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 06-05-2008, 11:22 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 06-06-2008, 03:27 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 06-06-2008, 08:07 PM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 06-23-2008, 06:42 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 06-27-2008, 09:45 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 07-10-2008, 03:25 AM
ErkanaAuth: A non-invasive user authentication library - by El Forum - 01-15-2009, 08:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB