예제 #1
0
 /**
  * @param $username
  * @return \CatLab\Accounts\Models\User|null
  */
 public function getFromUsername($username)
 {
     $query = new Query("\n\t\t\tSELECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\t{$this->table_users}\n\t\t\tWHERE\n\t\t\t\tu_username = ?\n\t\t");
     $query->bindValue(1, $username);
     return $this->getSingle($query->execute());
 }
 /**
  * @param $sub
  * @return \CatLab\OpenIDClient\Models\User|null
  */
 public function getFromSubject($sub)
 {
     $query = new Query("\n\t\t\tSELECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\t{$this->table_users}\n\t\t\tWHERE\n\t\t\t\tu_sub = ?\n\t\t");
     $query->bindValue(1, $sub);
     return $this->getSingle($query->execute());
 }