Skip to content

Commit

Permalink
Merge pull request #10 in FREEPBX/superfecta from bugfix/FREEPBX-1078…
Browse files Browse the repository at this point in the history
…2 to release/13.0

* commit '8314ec3c8a173aff7e1e91b50fbf752d5c8883cd':
  FREEPBX-10782 validate configuration parameters.
  • Loading branch information
tm1000 committed Apr 16, 2018
2 parents d89a8a2 + 8314ec3 commit 3ae1a32
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sources/source-GoogleContacts.module
Expand Up @@ -48,6 +48,13 @@ class GoogleContacts extends superfecta_base {

function get_caller_id($thenumber, $run_param=array()) {
$this->DebugPrint("Searching Google Contacts for number: {$thenumber}");
$paramlist = array('Client_ID','Client_Secret','Google_ID');
foreach($paramlist as $param){
if(!isset($run_param[$param])){
$this->DebugPrint("Run time parameter missing. Is this configured? Returning number as is");
return $thenumber;
}
}

// Set up the auth manager for this person.
$check = $this->googleAuthManager->configure(array('client_id' => $run_param['Client_ID'],
Expand Down

0 comments on commit 3ae1a32

Please sign in to comment.