UserPie icon indicating copy to clipboard operation
UserPie copied to clipboard

Great job, a couple of questions though.

Open Nineswiss opened this issue 11 years ago • 7 comments

Really like this however, I was wondering if there is a way to check if the users already exists when registering and also how can they assign themselves to a group at signup (ie. "Group Type", "Student" or "Teacher"? Cheers

Nineswiss avatar May 08 '13 01:05 Nineswiss

I was wondering if there is a way to check if the users already exists when registering...

Are you talking about some kind of alert message the user would see as they enter a username?

how can they assign themselves to a group at signup (ie. "Group Type", "Student" or "Teacher"?

Currently, that functionality does not exist. But it's a very good idea. I'm currently working on an update to UserPie and I'll definitely try to address that functionality you suggested.

booruguru avatar May 08 '13 13:05 booruguru

I don't think users assigning themselves to groups is a good idea. If they do, it will be a POST parameter, which is modifiable. They could change this with TamperData to Group=Administrator.

Also, in your example, a student could pretend to be a teacher even if he didn't know how to modify the request.

jose-ole avatar May 13 '13 16:05 jose-ole

I don't think users assigning themselves to groups is a good idea. If they do, it will be a POST parameter, which is modifiable. They could change this with TamperData to Group=Administrator.

Yeah, I thought about that. I figure if I implement this functionality I'll have to prevent users from assigning themselves to the admin group (not just by eliminating the option in the HTML, but in the PHP code itself).

booruguru avatar May 13 '13 16:05 booruguru

Even if you put in the code to check if the user selected a valid group that they are allowed to select, this doesn't prevent people from placing themselves in the wrong group of selectable options.

As with the original poster's example, you can prevent the user from assigning themselves to any group other than "student" and "teacher", but you cannot prevent a student from registering as a teacher. The only reason they would need to have separate groups is if one group had access to some actions while other groups didn't. In this example, a student would gain access to all that a teacher has access to, but if the student assigns himself rather than an admin making this assignment, it defeats the purpose of making separate groups.

jose-ole avatar May 13 '13 16:05 jose-ole

I don't know what the OP has in mind for their project. But there are
any number of reasons for why you would want a user to select their
own user group. For example, job banks typically segregate employers
in one user group while job seekers are in another group.

booruguru avatar May 13 '13 17:05 booruguru

Hey guys im new here but felt like adding somthing (yes I know this topic is out dated) but why not have it set up to where if sombody selected "teacher" that it would require the user fill in a new field asking for a confirmation code or somthing of that nature.

mattofstream avatar Feb 06 '14 22:02 mattofstream

For what it's worth, in my version (UserFrosting), I added an extra column in the uc_permissions table (is_default). Any permission group with is_default set to 1 is automatically linked to new accounts in user_create_user.php.

alexweissman avatar Mar 31 '14 02:03 alexweissman