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.

Looking for people to give feedback on Community Auth

March 14, 2012 10:42pm

Subscribe [20]
  • #1 / Mar 14, 2012 10:42pm

    skunkbad's avatar

    skunkbad

    1326 posts

    I see that people are downloading Community Auth, and I’ve still got very limited feedback on if there are any bugs or problems. Maybe that is a good thing?

    There is a new profile image uploader, and it does not currently fall back to a non-javascript uploader, but I’d appreciate if people would specifically test this javascript uploader and let me know if they can or cannot do a successful upload. There has been one person contacting me about the uploader, but they are not a developer, and they do not speak good English, so I’m kinda banging my head against the wall.

    Wiki article discussion is here:
    http://ellislab.com/forums/viewthread/127094/

    Thanks,
    Brian

  • #2 / Mar 15, 2012 9:26am

    InsiteFX's avatar

    InsiteFX

    6819 posts

    Hi skunkbad,

    I downloaded it but have not had the time to install it yet, I did look through it.

    I would like groups and a user can belong to multiple groups at once.

    Maybe this weekend I can find time to install it and test it out…

    I have switched over to using sha512 encryption in all my apps…

  • #3 / Mar 15, 2012 10:46am

    skunkbad's avatar

    skunkbad

    1326 posts

    Hi skunkbad,

    I downloaded it but have not had the time to install it yet, I did look through it.

    I would like groups and a user can belong to multiple groups at once.

    Maybe this weekend I can find time to install it and test it out…

    I have switched over to using sha512 encryption in all my apps…

    Hi InsiteFX,

    Thanks for your willingness to check it out. Maybe you could tell me more about your desire for groups. Right now I just have user levels ( Admin, Manager, and Customer ). How would you apply a group to these users? Check it out and then get back to me. Thanks again.

  • #4 / Mar 15, 2012 11:11am

    InsiteFX's avatar

    InsiteFX

    6819 posts

    Groups:

    -- ------------------------------------------------------------------------
    
    --
    -- Table structure for table 'groups'
    --
    
    DROP TABLE IF EXISTS `groups`;
    
    CREATE TABLE `groups` (
      `id`          int(10)      unsigned NOT NULL  AUTO_INCREMENT,
      `name`        varchar(50)           NOT NULL,
      `description` varchar(100)          NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    --
    -- Dumping data for table 'groups'
    --
    
    INSERT INTO `groups` (`id`, `name`, `description`) VALUES
    (1,'admin','Administrator'),
    (2,'members','General User');

    User Groups:
    Users can belong to multiple groups.

    -- ------------------------------------------------------------------------
    
    --
    -- Table structure for table 'users_groups'
    --
    
    DROP TABLE IF EXISTS `users_groups`;
    
    CREATE TABLE `users_groups` (
      `id`       int(10) unsigned NOT NULL  AUTO_INCREMENT,
      `user_id`  int(10) unsigned NOT NULL,
      `group_id` int(10) unsigned NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

    This way a user can belong to multiple groups.
    Would store it in an array for checking if the user belongs to
    the group in question.

    This way a page could be setup to allow multiple group access to the page.

     

  • #5 / Mar 15, 2012 12:14pm

    skunkbad's avatar

    skunkbad

    1326 posts

    Right now, multiple users can have access to a page without a specific group. Maybe what I have done will be sufficient, but let me know. If you take a look at the usage page in the documentation, you can see that multiple users can be authenticated, for instance, If I want Admins and Customers to have access to a page, but not Managers:

    public function whatever()
    {
         if( $this->require_role('Admin,Customer') )
         {
             // Login is required for admin and customer; manager has no access.
         }
    }

    This is not technically a group as you have stored in the database. What do you think?

    The account types are currently stored in a config file, authentication.php. It would be very easy to define some groups there too, and then create a new method in MY_Controller to handle login by a group name. Admin and Manager are both Employees, so I guess that could be considered a group. If you think this is beneficial, I’ll make it happen, but I just never did it because the existing require_role method is so easy to use.

  • #6 / Mar 15, 2012 8:23pm

    skunkbad's avatar

    skunkbad

    1326 posts

    I added a group authentication method as described in the post above. See it here:

    https://bitbucket.org/skunkbad/community-auth-ci-session-version/changeset/e4ae3df89147.

  • #7 / Mar 15, 2012 9:53pm

    InsiteFX's avatar

    InsiteFX

    6819 posts

    I will try to get this installed this weekend and check it all out.

    But wouldn’t be better to store the groups in the database?

  • #8 / Mar 15, 2012 10:46pm

    skunkbad's avatar

    skunkbad

    1326 posts

    But wouldn’t be better to store the groups in the database?

    I don’t know. I never needed a group before.

  • #9 / Mar 15, 2012 11:01pm

    Shawller

    5 posts

    Community Auth is the codeigniter auth I have ever used. I have tried so many but found this as the best and besides Brian has being very helpful.

    Like Research Associate said, it will be nice if users can belong to multiple groups and allow other members to see each other’s profile by searching either through names, username etc.

    Did you test the user profile picture to see if they are displaying, I tried all you instructed me to do but still not showing the picture after uploading it and the pictures were stored in the directory folder on my localhost when I checked it.

  • #10 / Mar 15, 2012 11:59pm

    skunkbad's avatar

    skunkbad

    1326 posts

    Community Auth is the codeigniter auth I have ever used. I have tried so many but found this as the best and besides Brian has being very helpful.

    Like Research Associate said, it will be nice if users can belong to multiple groups and allow other members to see each other’s profile by searching either through names, username etc.

    Did you test the user profile picture to see if they are displaying, I tried all you instructed me to do but still not showing the picture after uploading it and the pictures were stored in the directory folder on my localhost when I checked it.

    Shawller, I think it’s important to understand that the example controllers and functionality provided with Community Auth are only there to show you how things work. There is no plan for a specific application to be produced and distributed. Users are expected to be developers, perhaps new developers, that need an authentication solution and/or need a quick intoduction to CodeIgniter. I hope you have learned a lot by my examples. It’ll be nice to see what you create.

  • #11 / Mar 18, 2012 11:30am

    JuangaCovas

    3 posts

    Hey,

    Just wanted to stop by to give you my feedback on Community Auth. First post, but long time CodeIgniter user due my current work.

    Tested the full example you provide. As you say it’s not *just* a library. I think that the manual setup process to just view the example is a bit slow, but it’s worth it: everything is very elegantly resolved (but, once the setup is done, I had to manage to make it work on a non-root directory, etc. - My local setup for testing is XAMPP 1.7.7 and encountered some problems).

    I love the simplicity of the code usage, the max allowed login attempts with locking, and the default ‘disallow_multiple_logins’ option, keeping just an active session per account. I think you should ‘promote’ a bit more that feature: I was expecting a message like “you’re already logged, wait some minutes for the other session to logout or manually logout”, but you brilliantly allow the login, and the other session (or browser) just gets disconnected when tries to access a page that requires login. Smart! This feature it’s not only for security as you say, it’s very useful for subscription sites (makes an account more difficult to share with others).

    About image profiles, upload went OK for me, just a problem: the path for the image is assuming webroot / and that’s why the image isn’t showing up in my case. The file is there in upload_directory, etc.

    So, people, my advice is try this auth library / example. It really, really pays off.

    And skunkbad, thanks for your work and sharing! I’ll be using Community Auth soon for sure.

    Juanga

  • #12 / Mar 19, 2012 1:21am

    skunkbad's avatar

    skunkbad

    1326 posts

    Hey,

    Just wanted to stop by to give you my feedback on Community Auth. First post, but long time CodeIgniter user due my current work.

    Tested the full example you provide. As you say it’s not *just* a library. I think that the manual setup process to just view the example is a bit slow, but it’s worth it: everything is very elegantly resolved (but, once the setup is done, I had to manage to make it work on a non-root directory, etc. - My local setup for testing is XAMPP 1.7.7 and encountered some problems).

    I love the simplicity of the code usage, the max allowed login attempts with locking, and the default ‘disallow_multiple_logins’ option, keeping just an active session per account. I think you should ‘promote’ a bit more that feature: I was expecting a message like “you’re already logged, wait some minutes for the other session to logout or manually logout”, but you brilliantly allow the login, and the other session (or browser) just gets disconnected when tries to access a page that requires login. Smart! This feature it’s not only for security as you say, it’s very useful for subscription sites (makes an account more difficult to share with others).

    About image profiles, upload went OK for me, just a problem: the path for the image is assuming webroot / and that’s why the image isn’t showing up in my case. The file is there in upload_directory, etc.

    So, people, my advice is try this auth library / example. It really, really pays off.

    And skunkbad, thanks for your work and sharing! I’ll be using Community Auth soon for sure.

    Juanga

    Juanga, thanks for your feedback.

    I was kind of hoping that people would just like it enough that I wouldn’t have to promote certain features, but maybe a list of features should be on the home page of the Community Auth website.

    As for the uploader, it’s hard for me to test in every environment. I did a bunch of work to the uploader today, and it now falls back to php if javascript is disabled. If anyone is having problems that I can troubleshoot by having access to their environment, I’d be glad to work out the kinks. If you come up with a solution in regards to the uploader, please let me know.

    I think it can only get better as time goes by, so I’m glad you like it.

    Brian

  • #13 / Mar 19, 2012 8:09am

    Shawller

    5 posts

    Juanga that is the same problem I am having with the profile picture when using community auth, the path for the image is assuming webroot.

    I like community auth and I will recommend it to people new to codeigniter like me to be using. I have learnt a lot from it by modifiying template and css file to my own design and some of the code provided with community auth library.

    Skunkbad did a great deal of work regarding this auth and thanks a million for sharing it.

  • #14 / Mar 19, 2012 1:31pm

    skunkbad's avatar

    skunkbad

    1326 posts

    So it sounds like I need to figure a way to use base_url or FCPATH to determine the primary upload directory location. I can’t promise I’ll be able to do that until next weekend, but I’ll be taking a look at it next. I really want the uploader to work for everyone. If I could find another dev machine to work on it would be a lot easier to figure this out.

  • #15 / Mar 19, 2012 2:47pm

    CroNiX's avatar

    CroNiX

    4713 posts

    Why not just a config option for the path with a default value so the user can change it if they need to?  If you hardwire too much in it becomes less flexible to the users potential needs.

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

ExpressionEngine News!

#eecms, #events, #releases