Google Apps Login - Version 2.1

Version Description

New design to support multiple languages. Includes Serbo-Croatian. Fixed some conflicts with other plugins when used in 'auto redirect to Google' mode.

Download this release

Release Info

Developer danlester
Plugin Icon 128x128 Google Apps Login
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

core/core_google_apps_login.php CHANGED
@@ -10,6 +10,10 @@ class core_google_apps_login {
10
  $this->add_actions();
11
  }
12
 
 
 
 
 
13
  protected $newcookievalue = null;
14
  protected function get_cookie_value() {
15
  if (!$this->newcookievalue) {
@@ -50,34 +54,39 @@ class core_google_apps_login {
50
  return Array($client, $oauthservice);
51
  }
52
 
53
- public function ga_login_styles() { ?>
 
 
54
  <style type="text/css">
55
- form#loginform div.galogin {
56
- float: right;
57
- margin-top: 28px;
58
- background: #DFDFDF;
 
 
59
  text-align: center;
60
  vertical-align: middle;
61
  border-radius: 3px;
62
- padding: 2px;
63
- width: 58%;
64
  height: 27px;
 
 
65
  }
66
 
67
- form#loginform div.galogin a {
68
- color: #21759B;
69
- position: relative;
70
- top: 6px;
71
  }
72
 
73
- form#loginform div.galogin a:hover {
74
- color: #278AB7;
75
  }
76
 
77
- .login .button-primary {
78
- float: none;
79
- margin-top: 10px;
80
- }
81
  </style>
82
  <?php }
83
 
@@ -107,20 +116,25 @@ class core_google_apps_login {
107
 
108
  $do_autologin = false;
109
 
110
- if (isset($_GET['gaautologin'])) { // This GET param can always override the option set in admin pabel
111
  $do_autologin = $_GET['gaautologin'] == 'true';
112
  }
113
- elseif (($options['ga_auto_login'] && count($_GET) == 0)) {
114
- $do_autologin = true;
 
 
 
 
 
115
  }
116
 
117
- if ($do_autologin) {
118
  if (!headers_sent()) {
119
  wp_redirect($authUrl);
120
  exit;
121
  }
122
  else { ?>
123
- <p><b>Redirecting to <a href="<?php echo $authUrl; ?>">Login via Google</a>...</b></p>
124
  <script type="text/javascript">
125
  window.location = "<?php echo $authUrl; ?>";
126
  </script>
@@ -129,9 +143,18 @@ class core_google_apps_login {
129
  }
130
 
131
  ?>
132
- <div class="galogin">
133
- <a href="<?php echo $authUrl; ?>">or <b>Login with Google</b></a>
134
- </div>
 
 
 
 
 
 
 
 
 
135
  <?php
136
  }
137
 
@@ -151,12 +174,12 @@ class core_google_apps_login {
151
  if (isset($_REQUEST['error'])) {
152
  switch ($_REQUEST['error']) {
153
  case 'access_denied':
154
- $error_message = 'You did not grant access';
155
  break;
156
  case 'ga_needs_configuring':
157
- $error_message = 'The admin needs to configure Google Apps Login plugin - please follow '
158
  .'<a href="http://wp-glogin.com/installing-google-apps-login/#main-settings"'
159
- .' target="_blank">instructions here</a>';
160
  break;
161
  default:
162
  $error_message = htmlentities2($_REQUEST['error']);
@@ -173,20 +196,20 @@ class core_google_apps_login {
173
 
174
  if (isset($_GET['code'])) {
175
  if (!isset($_REQUEST['state'])) {
176
- $user = new WP_Error('ga_login_error', "Session mismatch - try again, but there could be a problem setting state");
177
  return $this->displayAndReturnError($user);
178
  }
179
 
180
  $statevars = explode('|', urldecode($_REQUEST['state']));
181
  if (count($statevars) != 2) {
182
- $user = new WP_Error('ga_login_error', "Session mismatch - try again, but there could be a problem passing state");
183
  return $this->displayAndReturnError($user);
184
  }
185
  $retnonce = $statevars[0];
186
  $retredirectto = $statevars[1];
187
 
188
  if (!wp_verify_nonce($retnonce, 'google_apps_login-'.$this->get_cookie_value())) {
189
- $user = new WP_Error('ga_login_error', "Session mismatch - try again, but there could be a problem setting cookies");
190
  return $this->displayAndReturnError($user);
191
  }
192
 
@@ -214,7 +237,7 @@ class core_google_apps_login {
214
  $google_verified_email = $userinfo['verified_email'];
215
 
216
  if (!$google_verified_email) {
217
- $user = new WP_Error('ga_login_error', 'Email needs to be verified on your Google Account');
218
  }
219
  else {
220
  $user = get_user_by('email', $google_email);
@@ -231,7 +254,7 @@ class core_google_apps_login {
231
  }
232
  }
233
  else {
234
- $user = new WP_Error('ga_login_error', "User authenticated OK, but error fetching user details from Google");
235
  }
236
  } catch (Google_Exception $e) {
237
  $user = new WP_Error('ga_login_error', $e->getMessage());
@@ -250,7 +273,8 @@ class core_google_apps_login {
250
  }
251
 
252
  protected function createUserOrError($userinfo, $options) {
253
- return( new WP_Error('ga_login_error', 'User '.$userinfo['email'].' not registered in Wordpress') );
 
254
  }
255
 
256
  protected function checkRegularWPLogin($user, $username, $password, $options) {
@@ -328,13 +352,10 @@ class core_google_apps_login {
328
  }
329
 
330
  public function ga_admin_auth_message() {
331
- ?>
332
- <div class="error">
333
- <p>You will need to complete Google Apps Login
334
- <a href="<?php echo $this->get_settings_url(); ?>">Settings</a>
335
- in order for the plugin to work
336
- </p>
337
- </div> <?php
338
  }
339
 
340
  public function ga_admin_init() {
@@ -358,15 +379,21 @@ class core_google_apps_login {
358
  }
359
  }
360
  }
 
 
 
 
 
 
361
  }
362
 
363
  protected function ga_admin_init_main() {
364
- add_settings_section('galogin_main_section', 'Main Settings',
365
  array($this, 'ga_mainsection_text'), $this->get_options_name());
366
 
367
- add_settings_field('ga_clientid', 'Client ID',
368
  array($this, 'ga_do_settings_clientid'), $this->get_options_name(), 'galogin_main_section');
369
- add_settings_field('ga_clientsecret', 'Client Secret',
370
  array($this, 'ga_do_settings_clientsecret'), $this->get_options_name(), 'galogin_main_section');
371
  }
372
 
@@ -375,33 +402,33 @@ class core_google_apps_login {
375
 
376
  public function ga_admin_init_multisite() {
377
  if (is_multisite()) {
378
- add_settings_section('galogin_multisite_section', 'Multisite Options',
379
  array($this, 'ga_multisitesection_text'), $this->get_options_name());
380
 
381
- add_settings_field('ga_ms_usesubsitecallback', 'Use sub-site specific callback from Google',
382
  array($this, 'ga_do_settings_ms_usesubsitecallback'), $this->get_options_name(), 'galogin_multisite_section');
383
  }
384
  }
385
 
386
  public function ga_admin_init_advanced() {
387
- add_settings_section('galogin_advanced_section', 'Advanced Options',
388
  array($this, 'ga_advancedsection_text'), $this->get_options_name());
389
 
390
- add_settings_field('ga_force_permissions', 'Force user to confirm Google permissions every time',
391
  array($this, 'ga_do_settings_force_permissions'), $this->get_options_name(), 'galogin_advanced_section');
392
 
393
- add_settings_field('ga_auto_login', 'Automatically redirect to Google from login page',
394
  array($this, 'ga_do_settings_auto_login'), $this->get_options_name(), 'galogin_advanced_section');
395
  }
396
 
397
  public function ga_admin_menu() {
398
  if (is_multisite()) {
399
- add_submenu_page( 'settings.php', 'Google Apps Login settings', 'Google Apps Login',
400
  'manage_network_options', $this->get_options_menuname(),
401
  array($this, 'ga_options_do_page'));
402
  }
403
  else {
404
- add_options_page('Google Apps Login settings', 'Google Apps Login',
405
  'manage_options', $this->get_options_menuname(),
406
  array($this, 'ga_options_do_page'));
407
  }
@@ -416,12 +443,12 @@ class core_google_apps_login {
416
  ?>
417
 
418
  <div>
419
- <h2>Google Apps Login setup</h2>
420
 
421
- <p>To set up your website to enable Google logins, you will need to follow instructions specific to your website.</p>
422
 
423
- <p><a href="<?php echo $this->calculate_instructions_url(); ?>#config" target="gainstr">Click here to open your
424
- personalized instructions in a new window</a></p>
425
 
426
  <?php
427
  $this->ga_section_text_end();
@@ -431,7 +458,7 @@ class core_google_apps_login {
431
  <?php settings_fields($this->get_options_pagename()); ?>
432
  <?php do_settings_sections($this->get_options_name()); ?>
433
 
434
- <input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" />
435
  </form></div> <?php
436
  }
437
 
@@ -440,7 +467,7 @@ class core_google_apps_login {
440
  ?>
441
  <div id="setting-error-settings_updated" class="updated settings-error">
442
  <p>
443
- <strong>Settings saved.</strong>
444
  </p>
445
  </div>
446
  <?php
@@ -467,46 +494,51 @@ class core_google_apps_login {
467
  public function ga_do_settings_clientid() {
468
  $options = $this->get_option_galogin();
469
  echo "<input id='input_ga_domainname' name='".$this->get_options_name()."[ga_clientid]' size='80' type='text' value='{$options['ga_clientid']}' />";
470
- echo "<br /><span>Normally something like 1234567890123-w1dwn5pfgjeo96c73821dfbof6n4kdhw.apps.googleusercontent.com</span>";
 
 
471
  }
472
 
473
  public function ga_do_settings_clientsecret() {
474
  $options = $this->get_option_galogin();
475
  echo "<input id='input_ga_clientsecret' name='".$this->get_options_name()."[ga_clientsecret]' size='40' type='text' value='{$options['ga_clientsecret']}' />";
476
- echo "<br /><span>Normally something like sHSfR4_jf_2jsy-kjPjgf2dT</span>";
 
 
477
  }
478
 
479
  public function ga_mainsection_text() {
480
- ?>
481
- <p>The instructions above will guide you to Google's Cloud Console where you will enter two URLs, and also
482
- obtain two codes (Client ID and Client Secret) which you will need to enter in the boxes below.
483
- </p>
484
- <?php
485
  }
486
 
487
  protected function ga_section_text_end() {
488
  }
489
 
490
  public function ga_multisitesection_text() {
491
- ?>
492
- <p>This setting is for multisite admins only. See <a href="<?php echo $this->calculate_instructions_url('m'); ?>#multisite" target="gainstr">instructions here</a>.
493
- </p>
494
- <?php
495
  }
496
 
497
  public function ga_do_settings_ms_usesubsitecallback() {
498
  $options = $this->get_option_galogin();
499
  echo "<input id='input_ga_ms_usesubsitecallback' name='".$this->get_options_name()."[ga_ms_usesubsitecallback]' type='checkbox' ".($options['ga_ms_usesubsitecallback'] ? 'checked' : '')." />";
500
- echo "<div>Leave unchecked if in doubt</div>";
 
 
501
  }
502
 
503
  public function ga_advancedsection_text() {
504
- ?>
505
- <p>Once you have the plugin working, you can try these settings to customize the login flow for your users.
506
- See <a href="<?php echo $this->calculate_instructions_url('a'); ?>#advanced" target="gainstr">instructions here</a>.
507
- </p>
508
- <?php
509
- }
510
 
511
  public function ga_do_settings_force_permissions() {
512
  $options = $this->get_option_galogin();
@@ -546,14 +578,14 @@ class core_google_apps_login {
546
  }
547
 
548
  protected function get_error_string($fielderror) {
549
- static $local_error_strings = Array(
550
- 'ga_clientid|tooshort_texterror' => 'The Client ID should be longer than that',
551
- 'ga_clientsecret|tooshort_texterror' => 'The Client Secret should be longer than that'
552
  );
553
  if (isset($local_error_strings[$fielderror])) {
554
  return $local_error_strings[$fielderror];
555
  }
556
- return 'Unspecified error';
557
  }
558
 
559
  protected function get_options_name() {
@@ -649,7 +681,7 @@ class core_google_apps_login {
649
 
650
  public function ga_plugin_action_links( $links, $file ) {
651
  if ($file == $this->my_plugin_basename()) {
652
- $settings_link = '<a href="'.$this->get_settings_url().'">Settings</a>';
653
  array_unshift( $links, $settings_link );
654
  }
655
 
@@ -659,7 +691,9 @@ class core_google_apps_login {
659
  // HOOKS AND FILTERS
660
  // *****************
661
 
662
- protected function add_actions() {
 
 
663
  add_action('login_enqueue_scripts', array($this, 'ga_login_styles'));
664
  add_action('login_form', array($this, 'ga_login_form'));
665
  add_action('authenticate', array($this, 'ga_authenticate'), 5, 3);
10
  $this->add_actions();
11
  }
12
 
13
+ public function ga_plugins_loaded() {
14
+ load_plugin_textdomain( 'google-apps-login', false, dirname($this->my_plugin_basename()).'/lang/' );
15
+ }
16
+
17
  protected $newcookievalue = null;
18
  protected function get_cookie_value() {
19
  if (!$this->newcookievalue) {
54
  return Array($client, $oauthservice);
55
  }
56
 
57
+ public function ga_login_styles() {
58
+ wp_enqueue_script('jquery');
59
+ ?>
60
  <style type="text/css">
61
+ form#loginform p.galogin {
62
+ background: none repeat scroll 0 0 #2EA2CC;
63
+ border-color: #0074A2;
64
+ box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
65
+ color: #FFFFFF;
66
+ text-decoration: none;
67
  text-align: center;
68
  vertical-align: middle;
69
  border-radius: 3px;
70
+ padding: 4px;
 
71
  height: 27px;
72
+ font-size: 14px;
73
+ margin-bottom: 16px;
74
  }
75
 
76
+ form#loginform p.galogin a {
77
+ color: #FFFFFF;
78
+ line-height: 27px;
79
+ font-weight: bold;
80
  }
81
 
82
+ form#loginform p.galogin a:hover {
83
+ color: #CCCCCC;
84
  }
85
 
86
+ h3.galogin-or {
87
+ text-align: center;
88
+ margin-bottom: 16px;
89
+ }
90
  </style>
91
  <?php }
92
 
116
 
117
  $do_autologin = false;
118
 
119
+ if (isset($_GET['gaautologin'])) { // This GET param can always override the option set in admin panel
120
  $do_autologin = $_GET['gaautologin'] == 'true';
121
  }
122
+ elseif ($options['ga_auto_login']) {
123
+ // Respect the option unless GET params mean we should remain on login page (e.g. ?loggedout=true)
124
+ if (count($_GET) == (isset($_GET['redirect_to']) ? 1 : 0)
125
+ + (isset($_GET['reauth']) ? 1 : 0)
126
+ + (isset($_GET['action']) && $_GET['action']=='login' ? 1 : 0)) {
127
+ $do_autologin = true;
128
+ }
129
  }
130
 
131
+ if ($do_autologin && $options['ga_clientid'] != '' && $options['ga_clientsecret'] != '') {
132
  if (!headers_sent()) {
133
  wp_redirect($authUrl);
134
  exit;
135
  }
136
  else { ?>
137
+ <p><b><?php printf( __( 'Redirecting to <a href="%s">Login via Google</a>...' , 'google-apps-login'), $authUrl ); ?></b></p>
138
  <script type="text/javascript">
139
  window.location = "<?php echo $authUrl; ?>";
140
  </script>
143
  }
144
 
145
  ?>
146
+ <p class="galogin">
147
+ <a href="<?php echo $authUrl; ?>"><?php _e( 'Login with Google' , 'google-apps-login'); ?></a>
148
+ </p>
149
+
150
+ <script>
151
+ jQuery(document).ready(function(){
152
+ var loginform = jQuery('#loginform,#front-login-form');
153
+ var googlelink = jQuery('p.galogin');
154
+ loginform.prepend("<h3 class='galogin-or'><?php esc_html_e( 'or' , 'google-apps-login'); ?></h3>");
155
+ loginform.prepend(googlelink);
156
+ });
157
+ </script>
158
  <?php
159
  }
160
 
174
  if (isset($_REQUEST['error'])) {
175
  switch ($_REQUEST['error']) {
176
  case 'access_denied':
177
+ $error_message = __( 'You did not grant access' , 'google-apps-login');
178
  break;
179
  case 'ga_needs_configuring':
180
+ $error_message = __( 'The admin needs to configure Google Apps Login plugin - please follow '
181
  .'<a href="http://wp-glogin.com/installing-google-apps-login/#main-settings"'
182
+ .' target="_blank">instructions here</a>' , 'google-apps-login');
183
  break;
184
  default:
185
  $error_message = htmlentities2($_REQUEST['error']);
196
 
197
  if (isset($_GET['code'])) {
198
  if (!isset($_REQUEST['state'])) {
199
+ $user = new WP_Error('ga_login_error', __( "Session mismatch - try again, but there could be a problem setting state" , 'google-apps-login') );
200
  return $this->displayAndReturnError($user);
201
  }
202
 
203
  $statevars = explode('|', urldecode($_REQUEST['state']));
204
  if (count($statevars) != 2) {
205
+ $user = new WP_Error('ga_login_error', __( "Session mismatch - try again, but there could be a problem passing state" , 'google-apps-login') );
206
  return $this->displayAndReturnError($user);
207
  }
208
  $retnonce = $statevars[0];
209
  $retredirectto = $statevars[1];
210
 
211
  if (!wp_verify_nonce($retnonce, 'google_apps_login-'.$this->get_cookie_value())) {
212
+ $user = new WP_Error('ga_login_error', __( "Session mismatch - try again, but there could be a problem setting cookies" , 'google-apps-login') );
213
  return $this->displayAndReturnError($user);
214
  }
215
 
237
  $google_verified_email = $userinfo['verified_email'];
238
 
239
  if (!$google_verified_email) {
240
+ $user = new WP_Error('ga_login_error', __( 'Email needs to be verified on your Google Account' , 'google-apps-login') );
241
  }
242
  else {
243
  $user = get_user_by('email', $google_email);
254
  }
255
  }
256
  else {
257
+ $user = new WP_Error('ga_login_error', __( "User authenticated OK, but error fetching user details from Google" , 'google-apps-login') );
258
  }
259
  } catch (Google_Exception $e) {
260
  $user = new WP_Error('ga_login_error', $e->getMessage());
273
  }
274
 
275
  protected function createUserOrError($userinfo, $options) {
276
+ return( new WP_Error('ga_login_error', sprintf( __( 'User %s not registered in Wordpress' , 'google-apps-login'),
277
+ $userinfo['email']) ) );
278
  }
279
 
280
  protected function checkRegularWPLogin($user, $username, $password, $options) {
352
  }
353
 
354
  public function ga_admin_auth_message() {
355
+ echo '<div class="error"><p>';
356
+ echo sprintf( __('You will need to complete Google Apps Login <a href="%s">Settings</a> in order for the plugin to work', 'google-apps-login'),
357
+ esc_url($this->get_settings_url()) );
358
+ echo '</p></div>';
 
 
 
359
  }
360
 
361
  public function ga_admin_init() {
379
  }
380
  }
381
  }
382
+ else {
383
+ $this->set_other_admin_notices();
384
+ }
385
+ }
386
+
387
+ protected function set_other_admin_notices() {
388
  }
389
 
390
  protected function ga_admin_init_main() {
391
+ add_settings_section('galogin_main_section', __('Main Settings', 'google-apps-login'),
392
  array($this, 'ga_mainsection_text'), $this->get_options_name());
393
 
394
+ add_settings_field('ga_clientid', __('Client ID', 'google-apps-login'),
395
  array($this, 'ga_do_settings_clientid'), $this->get_options_name(), 'galogin_main_section');
396
+ add_settings_field('ga_clientsecret', __('Client Secret', 'google-apps-login'),
397
  array($this, 'ga_do_settings_clientsecret'), $this->get_options_name(), 'galogin_main_section');
398
  }
399
 
402
 
403
  public function ga_admin_init_multisite() {
404
  if (is_multisite()) {
405
+ add_settings_section('galogin_multisite_section', __( 'Multisite Options' , 'google-apps-login'),
406
  array($this, 'ga_multisitesection_text'), $this->get_options_name());
407
 
408
+ add_settings_field('ga_ms_usesubsitecallback', __( 'Use sub-site specific callback from Google' , 'google-apps-login'),
409
  array($this, 'ga_do_settings_ms_usesubsitecallback'), $this->get_options_name(), 'galogin_multisite_section');
410
  }
411
  }
412
 
413
  public function ga_admin_init_advanced() {
414
+ add_settings_section('galogin_advanced_section', __( 'Advanced Options' , 'google-apps-login'),
415
  array($this, 'ga_advancedsection_text'), $this->get_options_name());
416
 
417
+ add_settings_field('ga_force_permissions', __( 'Force user to confirm Google permissions every time' , 'google-apps-login'),
418
  array($this, 'ga_do_settings_force_permissions'), $this->get_options_name(), 'galogin_advanced_section');
419
 
420
+ add_settings_field('ga_auto_login', __( 'Automatically redirect to Google from login page' , 'google-apps-login'),
421
  array($this, 'ga_do_settings_auto_login'), $this->get_options_name(), 'galogin_advanced_section');
422
  }
423
 
424
  public function ga_admin_menu() {
425
  if (is_multisite()) {
426
+ add_submenu_page( 'settings.php', __( 'Google Apps Login settings' , 'google-apps-login'), __( 'Google Apps Login' , 'google-apps-login'),
427
  'manage_network_options', $this->get_options_menuname(),
428
  array($this, 'ga_options_do_page'));
429
  }
430
  else {
431
+ add_options_page( __( 'Google Apps Login settings' , 'google-apps-login'), __( 'Google Apps Login' , 'google-apps-login'),
432
  'manage_options', $this->get_options_menuname(),
433
  array($this, 'ga_options_do_page'));
434
  }
443
  ?>
444
 
445
  <div>
446
+ <h2><?php _e('Google Apps Login setup', 'google-apps-login'); ?></h2>
447
 
448
+ <p><?php _e( 'To set up your website to enable Google logins, you will need to follow instructions specific to your website.', 'google-apps-login'); ?></p>
449
 
450
+ <p><a href="<?php echo $this->calculate_instructions_url(); ?>#config" target="gainstr"><?php
451
+ _e( 'Click here to open your personalized instructions in a new window' , 'google-apps-login'); ?></a></p>
452
 
453
  <?php
454
  $this->ga_section_text_end();
458
  <?php settings_fields($this->get_options_pagename()); ?>
459
  <?php do_settings_sections($this->get_options_name()); ?>
460
 
461
+ <input name="Submit" type="submit" value="<?php esc_attr_e( 'Save Changes' , 'google-apps-login'); ?>" />
462
  </form></div> <?php
463
  }
464
 
467
  ?>
468
  <div id="setting-error-settings_updated" class="updated settings-error">
469
  <p>
470
+ <strong><?php _e( 'Settings saved.', 'google-apps-login'); ?></strong>
471
  </p>
472
  </div>
473
  <?php
494
  public function ga_do_settings_clientid() {
495
  $options = $this->get_option_galogin();
496
  echo "<input id='input_ga_domainname' name='".$this->get_options_name()."[ga_clientid]' size='80' type='text' value='{$options['ga_clientid']}' />";
497
+ echo '<br /><span>';
498
+ printf( __('Normally something like %s', 'google-apps-login'), '1234567890123-w1dwn5pfgjeo96c73821dfbof6n4kdhw.apps.googleusercontent.com' );
499
+ echo '</span>';
500
  }
501
 
502
  public function ga_do_settings_clientsecret() {
503
  $options = $this->get_option_galogin();
504
  echo "<input id='input_ga_clientsecret' name='".$this->get_options_name()."[ga_clientsecret]' size='40' type='text' value='{$options['ga_clientsecret']}' />";
505
+ echo '<br /><span>';
506
+ printf( __('Normally something like %s', 'google-apps-login'), 'sHSfR4_jf_2jsy-kjPjgf2dT' );
507
+ echo '</span>';
508
  }
509
 
510
  public function ga_mainsection_text() {
511
+ echo '<p>';
512
+ _e( "The instructions above will guide you to Google's Cloud Console where you will enter two URLs, and also obtain two codes (Client ID and Client Secret) which you will need to enter in the boxes below.",
513
+ 'google-apps-login');
514
+ echo '</p>';
 
515
  }
516
 
517
  protected function ga_section_text_end() {
518
  }
519
 
520
  public function ga_multisitesection_text() {
521
+ echo '<p>';
522
+ printf( __('This setting is for multisite admins only. See <a href="%s" target="gainstr">instructions here</a>.', 'google-apps-login')
523
+ , $this->calculate_instructions_url('m').'#multisite' );
524
+ echo '</p>';
525
  }
526
 
527
  public function ga_do_settings_ms_usesubsitecallback() {
528
  $options = $this->get_option_galogin();
529
  echo "<input id='input_ga_ms_usesubsitecallback' name='".$this->get_options_name()."[ga_ms_usesubsitecallback]' type='checkbox' ".($options['ga_ms_usesubsitecallback'] ? 'checked' : '')." />";
530
+ echo "<div>";
531
+ _e( 'Leave unchecked if in doubt' , 'google-apps-login');
532
+ echo "</div>";
533
  }
534
 
535
  public function ga_advancedsection_text() {
536
+ echo '<p>';
537
+ printf( __('Once you have the plugin working, you can try these settings to customize the login flow for your users.', 'google-apps-login')
538
+ .' '.__('See <a href="%s" target="gainstr">instructions here</a>.', 'google-apps-login'),
539
+ $this->calculate_instructions_url('a').'#advanced' );
540
+ echo '</p>';
541
+ }
542
 
543
  public function ga_do_settings_force_permissions() {
544
  $options = $this->get_option_galogin();
578
  }
579
 
580
  protected function get_error_string($fielderror) {
581
+ $local_error_strings = Array(
582
+ 'ga_clientid|tooshort_texterror' => __('The Client ID should be longer than that', 'google-apps-login') ,
583
+ 'ga_clientsecret|tooshort_texterror' => __('The Client Secret should be longer than that', 'google-apps-login')
584
  );
585
  if (isset($local_error_strings[$fielderror])) {
586
  return $local_error_strings[$fielderror];
587
  }
588
+ return __( 'Unspecified error' , 'google-apps-login');
589
  }
590
 
591
  protected function get_options_name() {
681
 
682
  public function ga_plugin_action_links( $links, $file ) {
683
  if ($file == $this->my_plugin_basename()) {
684
+ $settings_link = '<a href="'.$this->get_settings_url().'">'.__( 'Settings' , 'google-apps-login').'</a>';
685
  array_unshift( $links, $settings_link );
686
  }
687
 
691
  // HOOKS AND FILTERS
692
  // *****************
693
 
694
+ protected function add_actions() {
695
+ add_action('plugins_loaded', array($this, 'ga_plugins_loaded'));
696
+
697
  add_action('login_enqueue_scripts', array($this, 'ga_login_styles'));
698
  add_action('login_form', array($this, 'ga_login_form'));
699
  add_action('authenticate', array($this, 'ga_authenticate'), 5, 3);
google_apps_login.php CHANGED
@@ -4,18 +4,20 @@
4
  * Plugin Name: Google Apps Login
5
  * Plugin URI: http://wp-glogin.com/
6
  * Description: Simple secure login for Wordpress through users' Google Apps accounts (uses secure OAuth2, and MFA if enabled)
7
- * Version: 2.0
8
  * Author: Dan Lester
9
  * Author URI: http://wp-glogin.com/
10
  * License: GPL3
11
  * Network: true
 
 
12
  */
13
 
14
  require_once( plugin_dir_path(__FILE__).'/core/core_google_apps_login.php' );
15
 
16
  class basic_google_apps_login extends core_google_apps_login {
17
 
18
- protected $PLUGIN_VERSION = '2.0';
19
 
20
  // Singleton
21
  private static $instance = null;
@@ -29,12 +31,46 @@ class basic_google_apps_login extends core_google_apps_login {
29
 
30
  public function ga_section_text_end() {
31
  ?>
32
- <p><b>For full support, and premium features that greatly simplify WordPress user management for admins, please visit:
33
  <a href="http://wp-glogin.com/?utm_source=Admin%20Promo&utm_medium=freemium&utm_campaign=Freemium" target="_blank">http://wp-glogin.com/</a></b>
34
  </p>
35
  <?php
36
  }
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  public function my_plugin_basename() {
39
  $basename = plugin_basename(__FILE__);
40
  if ('/'.$basename == __FILE__) { // Maybe due to symlink
4
  * Plugin Name: Google Apps Login
5
  * Plugin URI: http://wp-glogin.com/
6
  * Description: Simple secure login for Wordpress through users' Google Apps accounts (uses secure OAuth2, and MFA if enabled)
7
+ * Version: 2.1
8
  * Author: Dan Lester
9
  * Author URI: http://wp-glogin.com/
10
  * License: GPL3
11
  * Network: true
12
+ * Text Domain: google-apps-login
13
+ * Domain Path: /lang
14
  */
15
 
16
  require_once( plugin_dir_path(__FILE__).'/core/core_google_apps_login.php' );
17
 
18
  class basic_google_apps_login extends core_google_apps_login {
19
 
20
+ protected $PLUGIN_VERSION = '2.1';
21
 
22
  // Singleton
23
  private static $instance = null;
31
 
32
  public function ga_section_text_end() {
33
  ?>
34
+ <p><b><?php _e( 'For full support, and premium features that greatly simplify WordPress user management for admins, please visit:' , 'google-apps-login'); ?>
35
  <a href="http://wp-glogin.com/?utm_source=Admin%20Promo&utm_medium=freemium&utm_campaign=Freemium" target="_blank">http://wp-glogin.com/</a></b>
36
  </p>
37
  <?php
38
  }
39
 
40
+ protected function set_other_admin_notices() {
41
+ global $pagenow;
42
+ if (in_array($pagenow, array('users.php', 'user-new.php')) ) {
43
+ $no_thanks = get_site_option($this->get_options_name().'_no_thanks', false);
44
+ if (!$no_thanks) {
45
+ if (isset($_REQUEST['google_apps_login_action']) && $_REQUEST['google_apps_login_action']=='no_thanks') {
46
+ $this->ga_said_no_thanks(null);
47
+ }
48
+
49
+ add_action('admin_notices', Array($this, 'ga_user_screen_upgrade_message'));
50
+ if (is_multisite()) {
51
+ add_action('network_admin_notices', Array($this, 'ga_user_screen_upgrade_message'));
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ public function ga_said_no_thanks( $data ) {
58
+ update_site_option($this->get_options_name().'_no_thanks', true);
59
+ wp_redirect( remove_query_arg( 'google_apps_login_action' ) );
60
+ exit;
61
+ }
62
+
63
+ public function ga_user_screen_upgrade_message() {
64
+ $purchase_url = 'http://wp-glogin.com/google-apps-login-premium/?utm_source=User%20Pages&utm_medium=freemium&utm_campaign=Freemium';
65
+ $nothanks_url = add_query_arg( 'google_apps_login_action', 'no_thanks' );
66
+ echo '<div class="updated"><p>';
67
+ echo sprintf( __('Completely forget about WordPress user management - upgrade to <a href="%s">Google Apps Login premium</a> to automatically sync users from your Google Apps domain', 'google-apps-login'),
68
+ $purchase_url );
69
+ echo ' &nbsp; <a href="'.$purchase_url.'" class="button-secondary">' . __( 'Purchase', 'google-apps-login' ) . '</a>';
70
+ echo '&nbsp;<a href="' . esc_url( $nothanks_url ) . '" class="button-secondary">' . __( 'No Thanks', 'google-apps-login' ) . '</a>';
71
+ echo '</p></div>';
72
+ }
73
+
74
  public function my_plugin_basename() {
75
  $basename = plugin_basename(__FILE__);
76
  if ('/'.$basename == __FILE__) { // Maybe due to symlink
lang/google-apps-login-sr_RS.mo ADDED
Binary file
lang/google-apps-login-sr_RS.po ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/googleappslogin\n"
7
+ "POT-Creation-Date: 2014-02-03 15:02:47+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-02-11 13:41+0100\n"
12
+ "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+
16
+ #: basic_google_apps_login.php:34
17
+ msgid ""
18
+ "For full support, and premium features that greatly simplify WordPress user "
19
+ "management for admins, please visit:"
20
+ msgstr ""
21
+ "Za punu podršku, i vrhunske karakteristike koje u velikoj meri "
22
+ "pojednostavljuju upravljanje WordPress uputstvo za administratora , molimo "
23
+ "vas da posetite :"
24
+
25
+ #: core/core_google_apps_login.php:128
26
+ msgid "Redirecting to <a href=\"%s\">Login via Google</a>..."
27
+ msgstr "Redirektovanje na<a href=\"%s\">Login via Google</a>..."
28
+
29
+ #: core/core_google_apps_login.php:138
30
+ msgid "Login with Google"
31
+ msgstr "Login sa Google"
32
+
33
+ #: core/core_google_apps_login.php:146
34
+ msgid "or"
35
+ msgstr "ili"
36
+
37
+ #: core/core_google_apps_login.php:169
38
+ msgid "You did not grant access"
39
+ msgstr "Niste odobrili pristup"
40
+
41
+ #: core/core_google_apps_login.php:191
42
+ msgid ""
43
+ "Session mismatch - try again, but there could be a problem setting state"
44
+ msgstr ""
45
+ "Sesija neusklađenost - pokušajte ponovo , ali bi moglo da bude problem "
46
+ "postavljanja "
47
+
48
+ #: core/core_google_apps_login.php:197
49
+ msgid ""
50
+ "Session mismatch - try again, but there could be a problem passing state"
51
+ msgstr ""
52
+ "Sesija neusklađenost - pokušajte ponovo , ali bi moglo da bude problem "
53
+ "prolazno stanje"
54
+
55
+ #: core/core_google_apps_login.php:204
56
+ msgid ""
57
+ "Session mismatch - try again, but there could be a problem setting cookies"
58
+ msgstr ""
59
+ "Sesija neusklađenost - pokušajte ponovo , ali bi moglo da bude problem "
60
+ "postavljanja cookies"
61
+
62
+ #: core/core_google_apps_login.php:232
63
+ msgid "Email needs to be verified on your Google Account"
64
+ msgstr "Email treba da bude na vašen Google Account"
65
+
66
+ #: core/core_google_apps_login.php:249
67
+ msgid "User authenticated OK, but error fetching user details from Google"
68
+ msgstr "Korisnik autentifikovan OK, ali hvata detalje sa Google"
69
+
70
+ #: core/core_google_apps_login.php:268
71
+ msgid "User %s not registered in Wordpress"
72
+ msgstr "Korisnik %s nije registrovan u Wordpress-u"
73
+
74
+ #: core/core_google_apps_login.php:380
75
+ msgid "Main Settings"
76
+ msgstr "Glavne postavke"
77
+
78
+ #: core/core_google_apps_login.php:383
79
+ msgid "Client ID"
80
+ msgstr " ID klijenta"
81
+
82
+ #: core/core_google_apps_login.php:385
83
+ msgid "Client Secret"
84
+ msgstr "Tajni klijent"
85
+
86
+ #: core/core_google_apps_login.php:394
87
+ msgid "Multisite Options"
88
+ msgstr "Multisite Opcije"
89
+
90
+ #: core/core_google_apps_login.php:397
91
+ msgid "Use sub-site specific callback from Google"
92
+ msgstr "Koristite podsajt odredjen za callback sa Google"
93
+
94
+ #: core/core_google_apps_login.php:403
95
+ msgid "Advanced Options"
96
+ msgstr "Unapredjene opcije"
97
+
98
+ #: core/core_google_apps_login.php:406
99
+ msgid "Force user to confirm Google permissions every time"
100
+ msgstr "naterajte korisnike da koriste Google dozvole stalno"
101
+
102
+ #: core/core_google_apps_login.php:409
103
+ msgid "Automatically redirect to Google from login page"
104
+ msgstr "Automatski redirektovano na Google sa login stranice"
105
+
106
+ #: core/core_google_apps_login.php:415 core/core_google_apps_login.php:420
107
+ msgid "Google Apps Login settings"
108
+ msgstr "Google Apps Login postavke"
109
+
110
+ #: core/core_google_apps_login.php:415 core/core_google_apps_login.php:420
111
+ msgid "Google Apps Login"
112
+ msgstr "Google Apps Login"
113
+
114
+ #: core/core_google_apps_login.php:435
115
+ msgid "Google Apps Login setup"
116
+ msgstr "Google Apps Login postavke"
117
+
118
+ #: core/core_google_apps_login.php:437
119
+ msgid ""
120
+ "To set up your website to enable Google logins, you will need to follow "
121
+ "instructions specific to your website."
122
+ msgstr ""
123
+ "Da biste podesili svoj sajt da omogući Google logins , moraćete da sledite "
124
+ "uputstva specifične za vaš sajt ."
125
+
126
+ #: core/core_google_apps_login.php:440
127
+ msgid "Click here to open your personalized instructions in a new window"
128
+ msgstr ""
129
+ "Kliknite ovde da otvorite svoje personalizovane uputstva u novom prozoru"
130
+
131
+ #: core/core_google_apps_login.php:450
132
+ msgid "Save Changes"
133
+ msgstr "Sačuvaj promene"
134
+
135
+ #: core/core_google_apps_login.php:459
136
+ msgid "Settings saved."
137
+ msgstr "Postavke su sačuvane."
138
+
139
+ #: core/core_google_apps_login.php:487 core/core_google_apps_login.php:495
140
+ msgid "Normally something like %s"
141
+ msgstr "Normalno nešto kao %s"
142
+
143
+ #: core/core_google_apps_login.php:501
144
+ msgid ""
145
+ "The instructions above will guide you to Google's Cloud Console where you "
146
+ "will enter two URLs, and also obtain two codes (Client ID and Client Secret) "
147
+ "which you will need to enter in the boxes below."
148
+ msgstr ""
149
+ "Instrukcije iznad će vas voditi na Google Cloud Console gde ćete ući na dve "
150
+ "URL adrese , a takođe dobiti dva koda ( klient i klijent tajna) koja ćete "
151
+ "morati da unesete u polja ispod ."
152
+
153
+ #: core/core_google_apps_login.php:511
154
+ msgid ""
155
+ "This setting is for multisite admins only. See <a href=\"%s\" target="
156
+ "\"gainstr\">instructions here</a>."
157
+ msgstr ""
158
+ "Ova postavka je samo za MultiSite administratore. Pogledajte <a href=\"%s\" "
159
+ "target=\"gainstr\">uputstva ovde</a>."
160
+
161
+ #: core/core_google_apps_login.php:520
162
+ msgid "Leave unchecked if in doubt"
163
+ msgstr "Nemojte da čekirate ako niste sigurni"
164
+
165
+ #: core/core_google_apps_login.php:526
166
+ msgid ""
167
+ "Once you have the plugin working, you can try these settings to customize "
168
+ "the login flow for your users."
169
+ msgstr ""
170
+ "Kada vam plugin radi , možete da pokušate da prilagodite ova podešavanja za "
171
+ "svoje korisnike ."
172
+
173
+ #: core/core_google_apps_login.php:527
174
+ msgid "See <a href=\"%s\" target=\"gainstr\">instructions here</a>."
175
+ msgstr "pogledajte<a href=\"%s\" target=\"gainstr\"> uputstva ovde</a>."
176
+
177
+ #: core/core_google_apps_login.php:571
178
+ msgid "The Client ID should be longer than that"
179
+ msgstr "ID klijenta treba da bude duži od ovoga"
180
+
181
+ #: core/core_google_apps_login.php:572
182
+ msgid "The Client Secret should be longer than that"
183
+ msgstr "Tajni klijent trda da bude duži od toga"
184
+
185
+ #: core/core_google_apps_login.php:577
186
+ msgid "Unspecified error"
187
+ msgstr "Nespecifikovana greška"
188
+
189
+ #: core/core_google_apps_login.php:673
190
+ msgid "Settings"
191
+ msgstr "Postavke"
192
+
193
+ #: premium_google_apps_login.php:87
194
+ msgid "User with email address %s must use Login with Google"
195
+ msgstr "Korisnik sa email adresom %s moa da koristi Login sa Google"
196
+
197
+ #: premium_google_apps_login.php:115
198
+ msgid "User %s does not exist"
199
+ msgstr "Korisnik %s ne postoji"
200
+
201
+ #: premium_google_apps_login.php:124
202
+ msgid "Invalid email address"
203
+ msgstr "Nepostojeća email adresa"
204
+
205
+ #: premium_google_apps_login.php:132
206
+ msgid "Email address needs to be in %s"
207
+ msgstr "Email adresa treba da bude %s"
208
+
209
+ #: premium_google_apps_login.php:135
210
+ msgid "%s not authorized"
211
+ msgstr "%s nije autorizovano"
212
+
213
+ #: premium_google_apps_login.php:180
214
+ msgid "Domain Control"
215
+ msgstr "Domain kontrola"
216
+
217
+ #: premium_google_apps_login.php:183
218
+ msgid "My Google Apps domain"
219
+ msgstr "Moj Google Apps domain"
220
+
221
+ #: premium_google_apps_login.php:185
222
+ msgid "Auto-create new users on my domain"
223
+ msgstr "Automatsko stvaranje novih korisnika na vašem domain-u"
224
+
225
+ #: premium_google_apps_login.php:187
226
+ msgid "Disable WordPress username/password login for my domain"
227
+ msgstr "Onemogući WordPress korisničko ime/šifra login za moj domain"
228
+
229
+ #: premium_google_apps_login.php:189
230
+ msgid "Default role for new Google users"
231
+ msgstr "Default uloga za nove Google korisnike"
232
+
233
+ #: premium_google_apps_login.php:195
234
+ msgid ""
235
+ "By default, any existing account can authenticate either via Google (if a "
236
+ "Gmail/Google Apps account), or by WordPress username/password."
237
+ msgstr ""
238
+ "Podrazumevano , svaki postojeći nalog može da potvrdi autentičnost bilo "
239
+ "preko Google ( ako Gmail / Google Apps nalog ) , ili od strane WordPress "
240
+ "korisnik / lozinka ."
241
+
242
+ #: premium_google_apps_login.php:197
243
+ msgid ""
244
+ "To allow special behaviour on your Google Apps domain (auto-create users who "
245
+ "don't yet exist, or disable regular WordPress username/password access for "
246
+ "your users), fill in the following section."
247
+ msgstr ""
248
+ "Da biste dozvolili posebno ponašanje na Google Apps domenu ( automatsko "
249
+ "kreiranje korisnika koji još uvek ne postoji , ili onemogućite redovan "
250
+ "pristup WordPress korisničko ime / lozinku za svoje korisnike ) , popunite u "
251
+ "sledećem odeljku ."
252
+
253
+ #: premium_google_apps_login.php:199
254
+ msgid ""
255
+ "Please read the <a href=\"%s\" target=\"gainstr\">instructions here</a> "
256
+ "first."
257
+ msgstr "Pročitajte prvo <a href=\"%s\" target=\"gainstr\">uputstva ovde</a>."
258
+
259
+ #: premium_google_apps_login.php:217
260
+ msgid ""
261
+ "Tick with caution - leave unchecked until you are confident Google Login is "
262
+ "working for your own admin account"
263
+ msgstr ""
264
+ "Ophodite se sa oprezom - ostaviti neobeleženo dok se ne uverite da Google "
265
+ "Login radi za vaš nalog admin"
266
+
267
+ #: premium_google_apps_login.php:252
268
+ msgid ""
269
+ "Domain name should be a space-separated list of valid domains, in lowercase "
270
+ "letters (or blank)"
271
+ msgstr ""
272
+ "Domain imena bi trebala da budu lista validnih domena odvojena prostorom "
273
+ "napisano malim slovima (ili prazno)"
274
+
275
+ msgid ""
276
+ "Simple secure login for Wordpress through users' Google Apps accounts (uses "
277
+ "secure OAuth2, and MFA if enabled)"
278
+ msgstr ""
279
+ "Simple secure login za Wordpress kroz korisnike Google Apps naloga (ukoriste "
280
+ "sigurni OAuth2, i MFA ako je omogućeno)"
281
+
282
+ msgid ""
283
+ "Simple secure login and user management for Wordpress through your Google "
284
+ "Apps domain (uses secure OAuth2, and MFA if enabled)"
285
+ msgstr ""
286
+ "Simple secure login upravljanje korisnika za Wordpress kroz vaš Google Apps "
287
+ "domain (koristi sigurne OAuth2, i MFA ako je omogućeno)"
288
+
289
+ msgid "Google Apps Login Premium"
290
+ msgstr "Google Apps Login Premium"
lang/google-apps-login.pot ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/googleappslogin\n"
7
+ "POT-Creation-Date: 2014-02-17 16:39:40+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: basic_google_apps_login.php:34
16
+ msgid "For full support, and premium features that greatly simplify WordPress user management for admins, please visit:"
17
+ msgstr ""
18
+
19
+ #: basic_google_apps_login.php:67
20
+ msgid "Completely forget about WordPress user management - upgrade to <a href=\"%s\">Google Apps Login premium</a> to automatically sync users from your Google Apps domain"
21
+ msgstr ""
22
+
23
+ #: basic_google_apps_login.php:69
24
+ msgid "Purchase"
25
+ msgstr ""
26
+
27
+ #: basic_google_apps_login.php:70
28
+ msgid "No Thanks"
29
+ msgstr ""
30
+
31
+ #: core/core_google_apps_login.php:137
32
+ msgid "Redirecting to <a href=\"%s\">Login via Google</a>..."
33
+ msgstr ""
34
+
35
+ #: core/core_google_apps_login.php:147
36
+ msgid "Login with Google"
37
+ msgstr ""
38
+
39
+ #: core/core_google_apps_login.php:154
40
+ msgid "or"
41
+ msgstr ""
42
+
43
+ #: core/core_google_apps_login.php:177
44
+ msgid "You did not grant access"
45
+ msgstr ""
46
+
47
+ #: core/core_google_apps_login.php:199
48
+ msgid "Session mismatch - try again, but there could be a problem setting state"
49
+ msgstr ""
50
+
51
+ #: core/core_google_apps_login.php:205
52
+ msgid "Session mismatch - try again, but there could be a problem passing state"
53
+ msgstr ""
54
+
55
+ #: core/core_google_apps_login.php:212
56
+ msgid "Session mismatch - try again, but there could be a problem setting cookies"
57
+ msgstr ""
58
+
59
+ #: core/core_google_apps_login.php:240
60
+ msgid "Email needs to be verified on your Google Account"
61
+ msgstr ""
62
+
63
+ #: core/core_google_apps_login.php:257
64
+ msgid "User authenticated OK, but error fetching user details from Google"
65
+ msgstr ""
66
+
67
+ #: core/core_google_apps_login.php:276
68
+ msgid "User %s not registered in Wordpress"
69
+ msgstr ""
70
+
71
+ #: core/core_google_apps_login.php:356
72
+ msgid "You will need to complete Google Apps Login <a href=\"%s\">Settings</a> in order for the plugin to work"
73
+ msgstr ""
74
+
75
+ #: core/core_google_apps_login.php:391
76
+ msgid "Main Settings"
77
+ msgstr ""
78
+
79
+ #: core/core_google_apps_login.php:394
80
+ msgid "Client ID"
81
+ msgstr ""
82
+
83
+ #: core/core_google_apps_login.php:396
84
+ msgid "Client Secret"
85
+ msgstr ""
86
+
87
+ #: core/core_google_apps_login.php:405
88
+ msgid "Multisite Options"
89
+ msgstr ""
90
+
91
+ #: core/core_google_apps_login.php:408
92
+ msgid "Use sub-site specific callback from Google"
93
+ msgstr ""
94
+
95
+ #: core/core_google_apps_login.php:414
96
+ msgid "Advanced Options"
97
+ msgstr ""
98
+
99
+ #: core/core_google_apps_login.php:417
100
+ msgid "Force user to confirm Google permissions every time"
101
+ msgstr ""
102
+
103
+ #: core/core_google_apps_login.php:420
104
+ msgid "Automatically redirect to Google from login page"
105
+ msgstr ""
106
+
107
+ #: core/core_google_apps_login.php:426 core/core_google_apps_login.php:431
108
+ msgid "Google Apps Login settings"
109
+ msgstr ""
110
+
111
+ #: core/core_google_apps_login.php:426 core/core_google_apps_login.php:431
112
+ msgid "Google Apps Login"
113
+ msgstr ""
114
+
115
+ #: core/core_google_apps_login.php:446
116
+ msgid "Google Apps Login setup"
117
+ msgstr ""
118
+
119
+ #: core/core_google_apps_login.php:448
120
+ msgid "To set up your website to enable Google logins, you will need to follow instructions specific to your website."
121
+ msgstr ""
122
+
123
+ #: core/core_google_apps_login.php:451
124
+ msgid "Click here to open your personalized instructions in a new window"
125
+ msgstr ""
126
+
127
+ #: core/core_google_apps_login.php:461
128
+ msgid "Save Changes"
129
+ msgstr ""
130
+
131
+ #: core/core_google_apps_login.php:470
132
+ msgid "Settings saved."
133
+ msgstr ""
134
+
135
+ #: core/core_google_apps_login.php:498 core/core_google_apps_login.php:506
136
+ msgid "Normally something like %s"
137
+ msgstr ""
138
+
139
+ #: core/core_google_apps_login.php:512
140
+ msgid "The instructions above will guide you to Google's Cloud Console where you will enter two URLs, and also obtain two codes (Client ID and Client Secret) which you will need to enter in the boxes below."
141
+ msgstr ""
142
+
143
+ #: core/core_google_apps_login.php:522
144
+ msgid "This setting is for multisite admins only. See <a href=\"%s\" target=\"gainstr\">instructions here</a>."
145
+ msgstr ""
146
+
147
+ #: core/core_google_apps_login.php:531
148
+ msgid "Leave unchecked if in doubt"
149
+ msgstr ""
150
+
151
+ #: core/core_google_apps_login.php:537
152
+ msgid "Once you have the plugin working, you can try these settings to customize the login flow for your users."
153
+ msgstr ""
154
+
155
+ #: core/core_google_apps_login.php:538
156
+ msgid "See <a href=\"%s\" target=\"gainstr\">instructions here</a>."
157
+ msgstr ""
158
+
159
+ #: core/core_google_apps_login.php:582
160
+ msgid "The Client ID should be longer than that"
161
+ msgstr ""
162
+
163
+ #: core/core_google_apps_login.php:583
164
+ msgid "The Client Secret should be longer than that"
165
+ msgstr ""
166
+
167
+ #: core/core_google_apps_login.php:588
168
+ msgid "Unspecified error"
169
+ msgstr ""
170
+
171
+ #: core/core_google_apps_login.php:684
172
+ msgid "Settings"
173
+ msgstr ""
174
+
175
+ #: premium_google_apps_login.php:87
176
+ msgid "User with email address %s must use Login with Google"
177
+ msgstr ""
178
+
179
+ #: premium_google_apps_login.php:115
180
+ msgid "User %s does not exist"
181
+ msgstr ""
182
+
183
+ #: premium_google_apps_login.php:124
184
+ msgid "Invalid email address"
185
+ msgstr ""
186
+
187
+ #: premium_google_apps_login.php:132
188
+ msgid "Email address needs to be in %s"
189
+ msgstr ""
190
+
191
+ #: premium_google_apps_login.php:135
192
+ msgid "%s not authorized"
193
+ msgstr ""
194
+
195
+ #: premium_google_apps_login.php:180
196
+ msgid "Domain Control"
197
+ msgstr ""
198
+
199
+ #: premium_google_apps_login.php:183
200
+ msgid "My Google Apps domain"
201
+ msgstr ""
202
+
203
+ #: premium_google_apps_login.php:185
204
+ msgid "Auto-create new users on my domain"
205
+ msgstr ""
206
+
207
+ #: premium_google_apps_login.php:187
208
+ msgid "Disable WordPress username/password login for my domain"
209
+ msgstr ""
210
+
211
+ #: premium_google_apps_login.php:189
212
+ msgid "Default role for new Google users"
213
+ msgstr ""
214
+
215
+ #: premium_google_apps_login.php:195
216
+ msgid "By default, any existing account can authenticate either via Google (if a Gmail/Google Apps account), or by WordPress username/password."
217
+ msgstr ""
218
+
219
+ #: premium_google_apps_login.php:197
220
+ msgid "To allow special behaviour on your Google Apps domain (auto-create users who don't yet exist, or disable regular WordPress username/password access for your users), fill in the following section."
221
+ msgstr ""
222
+
223
+ #: premium_google_apps_login.php:199
224
+ msgid "Please read the <a href=\"%s\" target=\"gainstr\">instructions here</a> first."
225
+ msgstr ""
226
+
227
+ #: premium_google_apps_login.php:217
228
+ msgid "Tick with caution - leave unchecked until you are confident Google Login is working for your own admin account"
229
+ msgstr ""
230
+
231
+ #: premium_google_apps_login.php:252
232
+ msgid "Domain name should be a space-separated list of valid domains, in lowercase letters (or blank)"
233
+ msgstr ""
234
+
235
+ # wordpress plugin description
236
+ msgid "Simple secure login for Wordpress through users' Google Apps accounts (uses secure OAuth2, and MFA if enabled)"
237
+ msgstr ""
238
+
239
+ # wordpress plugin description
240
+ msgid "Simple secure login and user management for Wordpress through your Google Apps domain (uses secure OAuth2, and MFA if enabled)"
241
+ msgstr ""
242
+
243
+ # wordpress plugin description
244
+ msgid "Google Apps Login Premium"
245
+ msgstr ""
246
+
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: danlester
3
  Tags: login, google, authentication, oauth2, oauth, admin, google apps, sso, single-sign-on, auth, intranet
4
  Requires at least: 3.3
5
  Tested up to: 3.8
6
- Stable tag: 2.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -40,6 +40,8 @@ and easier to manage.
40
  [Google Drive Embedder](http://wordpress.org/plugins/google-drive-embedder/) is our free extension plugin allowing
41
  users to browse for Google Drive documents to embed directly in their posts or pages.
42
 
 
 
43
  = Requirements =
44
 
45
  One-click login will work for the following domains and user accounts:
@@ -53,6 +55,17 @@ Google Apps Login uses the latest secure OAuth2 authentication recommended by Go
53
  plugins may allow you to use your Google username and password to login, but they do not do this securely unless
54
  they also use OAuth2. This is discussed further in the [FAQ](http://wordpress.org/plugins/google-apps-login/faq/).
55
 
 
 
 
 
 
 
 
 
 
 
 
56
  = Website =
57
 
58
  Please see our website [http://wp-glogin.com/](http://wp-glogin.com/) for more information about this free plugin
@@ -174,6 +187,11 @@ please [click here](http://wp-glogin.com/installing-google-apps-login/basic-setu
174
 
175
  == Changelog ==
176
 
 
 
 
 
 
177
  = 2.0 =
178
 
179
  Our platform provides centralized setup and management of Google-related features in your
3
  Tags: login, google, authentication, oauth2, oauth, admin, google apps, sso, single-sign-on, auth, intranet
4
  Requires at least: 3.3
5
  Tested up to: 3.8
6
+ Stable tag: 2.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
40
  [Google Drive Embedder](http://wordpress.org/plugins/google-drive-embedder/) is our free extension plugin allowing
41
  users to browse for Google Drive documents to embed directly in their posts or pages.
42
 
43
+ Google Apps Login works on single or multisite WordPress websites or private intranets.
44
+
45
  = Requirements =
46
 
47
  One-click login will work for the following domains and user accounts:
55
  plugins may allow you to use your Google username and password to login, but they do not do this securely unless
56
  they also use OAuth2. This is discussed further in the [FAQ](http://wordpress.org/plugins/google-apps-login/faq/).
57
 
58
+ = Translations =
59
+
60
+ This plugin currently operates in the following languages:
61
+
62
+ * English - default
63
+ * Serbo-Croatian (sr_RS) - translated by Borisa Djuraskovic of [Web Hosting Hub](http://www.webhostinghub.com/)
64
+
65
+ We are looking for volunteers to translate into their own language. If you would like to contribute a translation, please
66
+ use the template POT file in the 'lang' folder, then email PO and MO files to contact@wp-glogin.com.
67
+ Please ask if you need instructions on how to produce those files.
68
+
69
  = Website =
70
 
71
  Please see our website [http://wp-glogin.com/](http://wp-glogin.com/) for more information about this free plugin
187
 
188
  == Changelog ==
189
 
190
+ = 2.1 =
191
+
192
+ New design to support multiple languages. Includes Serbo-Croatian. Fixed some conflicts
193
+ with other plugins when used in 'auto redirect to Google' mode.
194
+
195
  = 2.0 =
196
 
197
  Our platform provides centralized setup and management of Google-related features in your