Esempio n. 1
0
 public function allUser($client)
 {
     $userInfo = $client->api('user')->getCurrentUser();
     try {
         $user = new User();
         foreach ($userInfo as $key => $users) {
             $user->exchangeArray($users);
             $this->getUserTable()->saveUser($user);
         }
     } catch (\Exception $ex) {
         //send mail if any error occur during CRON JOB
     }
 }
 public function allUser()
 {
     $client = new Client("https://portal.optimusinfo.com/redmine/", 'vikas.singhal', 'vzi950');
     $userInfo = $client->api('user')->getCurrentUser();
     //echo "<pre>";print_r($userInfo);die;
     $user = new User();
     foreach ($userInfo as $key => $users) {
         $user->exchangeArray($users);
         $this->getUserTable()->saveUser($user);
     }
     return true;
 }