Example #1
0
 public function __construct($goid = 0)
 {
     parent::__construct();
     $this->goid = $goid;
     $this->datecreated = NULL;
     //Create query
     $dbQuery = "SELECT * FROM go_utenti ";
     $dbQuery .= "WHERE go_id = '" . $goid . "'";
     $gouser = $this->access->select($dbQuery);
     if ($gouser) {
         $this->goid = $goid;
         $this->id = $gouser[0]['rp_id'];
         $this->nome = $gouser[0]['go_firstname'];
         $this->cognome = $gouser[0]['go_lastname'];
         $this->email = $gouser[0]['go_email'];
         $this->avatarUrl = $gouser[0]['go_avatar'];
         $this->datecreated = $gouser[0]['date_created'];
     }
 }
Example #2
0
 public function __construct($fbid = 0)
 {
     parent::__construct();
     $this->fbid = $fbid;
     $this->datecreated = NULL;
     //Create query
     $dbQuery = "SELECT * FROM fb_customers ";
     $dbQuery .= "WHERE fb_id = " . $fbid;
     $fbuser = $this->access->select($dbQuery);
     if ($fbuser) {
         $this->fbid = $fbid;
         $this->id = $fbuser[0]['rp_id'];
         $this->nome = $fbuser[0]['fb_firstname'];
         $this->cognome = $fbuser[0]['fb_lastname'];
         $this->email = $fbuser[0]['fb_email'];
         $this->avatarUrl = 'https://graph.facebook.com/' . $fbid . '/picture';
         $this->datecreated = $fbuser[0]['date_created'];
     }
 }