Skip to content
Snippets Groups Projects
Commit 04ea3b64 authored by Satish's avatar Satish
Browse files

Google sync throwing error to login

parent 2d7a178e
No related branches found
No related tags found
No related merge requests found
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/* +**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
* ***********************************************************************************/
Class Google_Config_Connector {
static $clientId = '';
static $clientSecret = '';
static $clientId = '';
static $clientSecret = '';
static $redirectUrl = '';
}
......@@ -54,14 +54,14 @@ class Google_Oauth2_Connector {
const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
public function __construct($module,$userId=false) {
global $site_URL;
$this->source_module = $module;
if($userId) $this->user_id = $userId;
$this->service_name = $this->service_provider . $module;
$this->client_id = Google_Config_Connector::$clientId;
$this->client_secret = Google_Config_Connector::$clientSecret;
$this->redirect_uri = rtrim($site_URL, '/').'/index.php?module=Google&view=List&operation=sync&sourcemodule='.$this->source_module.'&service='.$this->service_name;
$this->scope = $this->scopes[$this->source_module];
global $site_URL;
$this->source_module = $module;
if($userId) $this->user_id = $userId;
$this->service_name = $this->service_provider . $module;
$this->client_id = Google_Config_Connector::$clientId;
$this->client_secret = Google_Config_Connector::$clientSecret;
$this->redirect_uri = Google_Config_Connector::$redirectUrl;
$this->scope = $this->scopes[$this->source_module];
}
public function getClientId() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment