Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Great job, a couple of questions though. #4

Open
Nineswiss opened this issue May 8, 2013 · 7 comments
Open

Great job, a couple of questions though. #4

Nineswiss opened this issue May 8, 2013 · 7 comments

Comments

@Nineswiss
Copy link

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

@booruguru
Copy link
Owner

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.

@jose-ole
Copy link

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.

@booruguru
Copy link
Owner

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).

@jose-ole
Copy link

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.

@booruguru
Copy link
Owner

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.

@mattofstream
Copy link

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.

@alexweissman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants