$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>plugins - Wordpress Integration with Google Groups|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

plugins - Wordpress Integration with Google Groups

matteradmin8PV0评论

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?

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?

Share Improve this question edited Jun 16, 2016 at 16:35 Pat J 12.5k2 gold badges29 silver badges36 bronze badges asked Jun 16, 2016 at 15:40 Pedro Luiz SantosPedro Luiz Santos 134 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 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.
Post a comment

comment list (0)

  1. No comments so far