1

I'm having some trouble trying to make an area on my WordPress site, that must be accessible only to members of my Google Group. I tried to make it with some plugin, but most of them would take me to have to ask the users to register themselves in the website, and that would not include a validator to see if he is a member of the Google group.

So, my point is: Is there any way to make a area of my website themselves accessible only by members of a Google Group? If so, how could I do that?

0

Most of your question is off topic, I guess, because it involves a question about Google's APIs. You would need three things:

  1. Create the possibility to login to your site with a Google account. There are plugins that make this possible, like this one.
  2. Import the list of group members from Google. There probably is an API for this, but that is out of the scope of this site. Once you have an array of users an mailaddresses, you can use wp_create_user to make new entries in your user table. You would have to set a transient for this, to prevent looking for new group members at Google with every pageload. Also, you should create a special user role for group members.
  3. Finally, in your templates you can add a check for users that are logged in with that special role to display exclusive information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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