CodeIgniter Forums
CL Auth [BETA] v0.2.5 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: CL Auth [BETA] v0.2.5 (/showthread.php?tid=8048)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


CL Auth [BETA] v0.2.5 - El Forum - 08-17-2008

[eluser]FlashUK[/eluser]
No, its because I hadn't included the latest examples with Beta v0.2.

I had meant to include them straight after the release but I've been distracted lately. I shall give a reply when I have included the latest examples.


CL Auth [BETA] v0.2.5 - El Forum - 08-17-2008

[eluser]Delete Me Please[/eluser]
Oh, okay then Smile. I just wanted to make sure I wasn't doing anything wrong. Thank you for your quick reply.


CL Auth [BETA] v0.2.5 - El Forum - 08-17-2008

[eluser]FlashUK[/eluser]
Okay, I have updated it to v0.2.5.

The only change is that I have included the example files with the download.

You can download the latest version here: CL_Auth_BETA-v0.2.5.zip

You can download the example files if you already have a working copy of version v0.2:
CL Auth BETA - Examples

I hope this helps ^_^


CL Auth [BETA] v0.2.5 - El Forum - 08-17-2008

[eluser]Delete Me Please[/eluser]
You are missing the controller for the example. Sorry to keep bugging you heh.


CL Auth [BETA] v0.2.5 - El Forum - 08-17-2008

[eluser]FlashUK[/eluser]
Ah. Well spotted. It has been added now ^_^


CL Auth [BETA] v0.2.5 - El Forum - 08-17-2008

[eluser]Delete Me Please[/eluser]
Thank you very much. I'm playing around with this now and I've put $this->cl_auth->check(); in the Welcome controller and added a record for /welcome in the cl_group_uri table. In the record I made group id 0 (for registered user). I have two logins in the database, one with group_id 1 and other with 0. If I login with the username that has group_id 1 (my admin login) it says that I'm denied to see the welcome page, but if I login with the registered user, it works. Shouldn't it work for the admin? Just see that the group_id number is higher than what it calls for, meaning it's looking for 0 and anything higher should work.

Another issue (maybe suggestion) I have is with "isAdmin()", I don't quite understand it's usefulness. Wouldn't it be better to move the "is_admin" field to the "cl_users" table, or even better the "cl_groups" table? That way you don't have to set each uri with "is_admin" 1 because obviously if someone is an admin, they should have access to any admin functions you have set for any of those uri's. Let me know if I'm way off base here...


CL Auth [BETA] v0.2.5 - El Forum - 08-22-2008

[eluser]a&w[/eluser]
I was browsing the code and noticed that the _gen_pass pulls characters from a 'pool'. Good idea to remove the zero to reduce confusion with letter O. But, then I started to wonder if the user would still not know if it was a letter O or number 0. So I was thinking you should maybe consider removing the letter O also.

One other side comment. I've noticed several auth libraries tend to use "redirect". That's fine, but it might be better abstracted to have some "myRedirect" method or something whereby you could control the output. The situation arises if you're using ajax to login. Instead of doing header redirect, the end user may just want to pass back the uri or url so the client can handle the redirect.

Code:
function myRedirect($uri = '', $method = 'location' , $mode = 'header')
{
   if ('header' == $mode) {
      redirect($uri , $method);
   } else {
      header("Content-type: application/javascript; charset: UTF-8");
      echo utf8_encode($uri);
   }
}



CL Auth [BETA] v0.2.5 - El Forum - 08-27-2008

[eluser]FlashUK[/eluser]
[quote author="MeanStudios" date="1219040140"]Thank you very much. I'm playing around with this now and I've put $this->cl_auth->check(); in the Welcome controller and added a record for /welcome in the cl_group_uri table. In the record I made group id 0 (for registered user). I have two logins in the database, one with group_id 1 and other with 0. If I login with the username that has group_id 1 (my admin login) it says that I'm denied to see the welcome page, but if I login with the registered user, it works. Shouldn't it work for the admin? Just see that the group_id number is higher than what it calls for, meaning it's looking for 0 and anything higher should work.

Another issue (maybe suggestion) I have is with "isAdmin()", I don't quite understand it's usefulness. Wouldn't it be better to move the "is_admin" field to the "cl_users" table, or even better the "cl_groups" table? That way you don't have to set each uri with "is_admin" 1 because obviously if someone is an admin, they should have access to any admin functions you have set for any of those uri's. Let me know if I'm way off base here...[/quote]

MeanStudios: Yes, good suggestions. I am currently looking for a better way to implement admin access, but the reason is_admin is in the uri_group is because it acts like a Control List (ACL).

a&w;: Removing O and 0 altogether is a good suggestion. As for myRedirect() for AJAX requests, I shall consider something similar for the login() function (something like a false redirect flag).


CL Auth [BETA] v0.2.5 - El Forum - 09-05-2008

[eluser]Unknown[/eluser]
I'm not sure if this has been addressed yet, but I needed to make a code change to get the forgotten password feature to work.

In CL_Auth::forgotten_pass I changed

Code:
$data['reset_uri'] = site_url($this->ci->config->item('CL_reset_uri')."/{$row->username_clean}/{$data['key']}");
to

Code:
$data['reset_uri'] = site_url($this->ci->config->item('CL_reset_uri')."/{$row->id}/{$data['key']}");
In other words, the username_clean portion of the uri needs to be changed to id, because that's what Users::activate_newpass will expect.


Love the package. Really would like to see some some examples soon, please.

Thanks.


CL Auth [BETA] v0.2.5 - El Forum - 09-13-2008

[eluser]Snoopykiss[/eluser]
I just wanted to give a GREAT BIG thanks for writing this module. It's great and saved me so much time that I might have given up on my project.

I hope that at some point, I'll be able to contribute something like this back to the community.