Skip to content

Commit

Permalink
Try to fix Google login
Browse files Browse the repository at this point in the history
Honestly, I have no clue at this point, but setting the PHP timezone to
UTC seems to fix most of the login bugs I've been seeing.
  • Loading branch information
Zarel committed Oct 30, 2017
1 parent 71341bb commit 9e35550
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ntbb-session.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ private function passwordVerifyInner($userid, $pass, $user) {
}

if (substr(@$user['email'], -1) === '@') {
// Timezone determined to work at 7:30 PM CDT
// Timezones known to fail at various times: America/Chicago, America/New_York
date_default_timezone_set('UTC');
require_once dirname(__FILE__).'/../vendor/autoload.php';
date_default_timezone_set('America/New_York');
$client = new Google_Client(['client_id' => $psconfig['gapi_clientid']]);
$payload = '';
try {
Expand Down

0 comments on commit 9e35550

Please sign in to comment.