Exemple #1
0
 public function getUserData($vkId)
 {
     $bind = ['vkId' => $vkId, 'partnerId' => Config::getInstance()->partnerId];
     $data = [];
     $res = $this->db->select('users', 'partnerId = :partnerId AND vkId = :vkId', $bind);
     if (count($res) == 1) {
         $data = $res[0];
     }
     return $data;
 }
Exemple #2
0
 public function getTasksFromOwner($type)
 {
     $bind = ['partnerId' => App::getPartnerId(), 'ownerId' => App::getUserId()];
     $where = "partnerId = :partnerId AND ownerId = :ownerId";
     if ($type != 'all') {
         $where .= ' AND `type` = :type';
         $bind['type'] = $type;
     }
     return $this->db->select('tasks', $where, $bind);
 }