EllisLab text mark
Advanced Search
1 of 6
1
   
Looking for people to give feedback on Community Auth
Posted: 14 March 2012 10:42 PM   [ Ignore ]
Avatar
Joined: 2009-05-17
1415 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

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 15 March 2012 09:26 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 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…

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 15 March 2012 10:46 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
InsiteFX - 15 March 2012 09:26 AM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 15 March 2012 11:11 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 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,
  `
descriptionvarchar(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(10unsigned NOT NULL  AUTO_INCREMENT,
  `
user_id`  int(10unsigned NOT NULL,
  `
group_idint(10unsigned 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.

 

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 15 March 2012 12:14 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 15 March 2012 08:23 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 15 March 2012 09:53 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 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?

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 15 March 2012 10:46 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
InsiteFX - 15 March 2012 09:53 PM

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

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

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 15 March 2012 11:01 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Joined: 2012-02-29
6 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.

 
Posted: 15 March 2012 11:59 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
Shawller - 15 March 2012 11:01 PM

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 18 March 2012 11:30 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Joined: 2012-03-18
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

 
Posted: 19 March 2012 01:21 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
JuangaCovas - 18 March 2012 11:30 AM

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

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 19 March 2012 08:09 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Joined: 2012-02-29
6 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.

 
Posted: 19 March 2012 01:31 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 19 March 2012 02:47 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2009-02-19
3801 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.

 Signature 
 
Posted: 19 March 2012 03:24 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
CroNiX - 19 March 2012 02:47 PM

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.

Right now the developer does have the option of changing the config in config/upload_manager.php.

Line 17 is this:
$config[‘upload_dir’] = ‘upload_directory’;

I’m pretty sure that a simple change to:
$config[‘upload_dir’] = ‘***/upload_directory’;

where *** is their sub directory would make it work for people having their codeigniter install in a sub directory. The problem is, I don’t have a WAMP install or environment where I can test this out.

So the upload directory is not exactly hardwired into the uploader. I’m just not sure I can come up with a solution that works for everyone. If you browse through the forum and look at people having issues related to the standard uploader, there are issues related to the the ‘upload_path’ config item that make it difficult for my uploader to work “out of the box” for everyone. It’s really a CI issue. I’ll try to make some changes to make it easier for everyone to configure, and add some documentation to clarify usage.

As I mentioned above, I’m going to try to see if I can use the FCPATH constant to fix things. Since the upload class config item ‘upload_path’ can be an absolute path, I don’t see why I couldn’t use that in the _set_upload_location() and _make_directories() methods in MY_Upload. I’ll give it a shot, and hopefully I can get people to confirm that it works or doesn’t work.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
1 of 6
1