public function loginUser(){
$username = filter_var($_GET['username'],FILTER_SANITIZE_STRING);
$pw = filter_var($_GET['pw'],FILTER_SANITIZE_STRING);
$row = $this->userModel->selectUser($username);
if (password_verify($pw,$row['pw'])){
$_SESSION["userId"] = $row['id'];
$this->isLogin();
} else{
new Msg(true,"Benutzername und Passwort stimmen nicht überein!");
}
}
A short example for an user Login