01ec3695 by G Manojkumar

userarray creation

1 parent 508f6466
...@@ -721,7 +721,6 @@ if($action=="closecall") ...@@ -721,7 +721,6 @@ if($action=="closecall")
721 $userlog=UserLog::where('user_id','=',Auth::user()->id)->orderBy("id","DESC")->first(); 721 $userlog=UserLog::where('user_id','=',Auth::user()->id)->orderBy("id","DESC")->first();
722 $userlog->getLastTs($crmcall->sipid_id,$nowts); 722 $userlog->getLastTs($crmcall->sipid_id,$nowts);
723 $userlog->save(); 723 $userlog->save();
724 if(Auth::user()->username=='S32732' && $kstychCall['callnumber']=='9324046534'){
725 try{ 724 try{
726 $smscontroller = new SmsController(); 725 $smscontroller = new SmsController();
727 $smscontroller->sendSmsBasedOnSubDisposition($kstychCall); 726 $smscontroller->sendSmsBasedOnSubDisposition($kstychCall);
...@@ -729,7 +728,6 @@ if($action=="closecall") ...@@ -729,7 +728,6 @@ if($action=="closecall")
729 Log::info($e->getMessage()); 728 Log::info($e->getMessage());
730 } 729 }
731 } 730 }
732 }
733 731
734 return Response::make(""); 732 return Response::make("");
735 } 733 }
......
...@@ -7,14 +7,18 @@ use Log; ...@@ -7,14 +7,18 @@ use Log;
7 class SmsController extends Controller 7 class SmsController extends Controller
8 { 8 {
9 public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; 9 public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?';
10 public $userarray = array("A21568","admin");
10 public function sendSmsBasedOnSubDisposition($kstychCall) 11 public function sendSmsBasedOnSubDisposition($kstychCall)
11 { 12 {
13 $users = $this->userarray;
14 if(in_array(Auth::user()->username , $users)){
12 $msgText = $this->getSmsTemplate($kstychCall); 15 $msgText = $this->getSmsTemplate($kstychCall);
13 if( !empty($msgText) ) { 16 if( !empty($msgText) ) {
14 $msgText = $this->fillValuesInTemplate($msgText); 17 $msgText = $this->fillValuesInTemplate($msgText);
15 Log::info($msgText); 18 Log::info($msgText);
16 $this->sendSmsRequest($kstychCall, $msgText); 19 $this->sendSmsRequest($kstychCall, $msgText);
17 } 20 }
21 }
18 return; 22 return;
19 } 23 }
20 public function sendSmsRequest($kstychCall, $msgText) 24 public function sendSmsRequest($kstychCall, $msgText)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!