Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to give users the option to log in to their favorite group on login? So if a user belongs to say half a dozen groups I can show those groups on the login with some sort of drop down menu and have a checkbox they can tick off to select the Buddypress group they want to log directly into.

share|improve this question

closed as off-topic by Pieter Goosen, gmazzap, kaiser Aug 4 '14 at 16:52

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

Not really since you need the user to log in first to get the list of groups he is a member of. – Bainternet Mar 25 '12 at 9:15

1 Answer 1

up vote 0 down vote accepted

+1 to what @Bainternet said.

The only way I can imagine is if you used some ajax on the username field, so that when a username was entered (on blur maybe), a request would be sent to get that user's groups. I would never do this, however, as it would allow anyone to look at a list of a user's groups merely by typing their name into the login field, which seems to me a pretty serious privacy concern.

You could, without too much trouble, have a user setting that would allow a user to specify the group that he/she would like to be redirected to upon every login. You'd use the login_redirect filter hook to do the magic.

share|improve this answer
Thank you Boone! could you please point me to where there might be some documentation relating to this particular login_redirect filter hook? – Joseph Mar 25 '12 at 18:10
Here's some stuff about it:… Here's where the filter is defined in WP – Boone Gorges Mar 25 '12 at 18:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.