Skip to content

Commit

Permalink
FREEPBX-10782 validate configuration parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfinstrom committed Apr 15, 2018
1 parent 1e6c3f3 commit 8314ec3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sources/source-GoogleContacts.module
Original file line number Diff line number Diff line change
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 8314ec3

Please sign in to comment.