Beispiel #1
0
 public function checkLogin()
 {
     $sqlUsername = sprintf('SELECT * FROM %s WHERE %s = ?', $this->getTableName(), $this->getUsernameName());
     $dataUsername = DbStorage::query($sqlUsername, [$this->getUsernameValue()]);
     if (!empty($dataUsername) && $dataUsername[0]['password'] == $this->getPasswordValue()) {
         return $dataUsername;
     }
     return false;
 }