@@ -59,8 +59,9 @@ public function authenticate()
5959 {
6060 $ profile = $ this ->getProfile ();
6161
62- if (! empty ($ profile )) {
62+ if (!empty ($ profile )) {
6363 $ this ->userInfo = new GoogleUserProvider ($ profile , $ this ->isAccountCreationAllowed ($ profile ));
64+
6465 return true ;
6566 }
6667
@@ -179,7 +180,7 @@ public function getGoogleClientSecret()
179180 *
180181 * @access public
181182 * @return string
182- */
183+ */
183184 public function getGoogleEmailDomains ()
184185 {
185186 if (defined ('GOOGLE_EMAIL_DOMAINS ' ) && GOOGLE_EMAIL_DOMAINS ) {
@@ -189,6 +190,21 @@ public function getGoogleEmailDomains()
189190 return $ this ->configModel ->get ('google_email_domains ' );
190191 }
191192
193+ /**
194+ * Get Google allowed email domains
195+ *
196+ * @access public
197+ * @return string
198+ */
199+ public function getGoogleSignupGroups ()
200+ {
201+ if (defined ('GOOGLE_SIGNUP_GROUPS ' ) && GOOGLE_SIGNUP_GROUPS ) {
202+ return GOOGLE_SIGNUP_GROUPS ;
203+ }
204+
205+ return $ this ->configModel ->get ('google_signup_groups ' );
206+ }
207+
192208 /**
193209 * Return true if the account creation is allowed according to the settings
194210 *
@@ -201,7 +217,7 @@ public function isAccountCreationAllowed(array $profile)
201217 if ($ this ->configModel ->get ('google_account_creation ' , 0 ) == 1 ) {
202218 $ domains = $ this ->getGoogleEmailDomains ();
203219
204- if (! empty ($ domains )) {
220+ if (!empty ($ domains )) {
205221 return $ this ->validateDomainRestriction ($ profile , $ domains );
206222 }
207223
0 commit comments