Merge branch 'Controller' into Services
This commit is contained in:
commit
a23788ba7c
2 files changed
+28
-9
No files matched your search
@@ -87,10 +87,6 @@ class getSpecificData {
|
||||
}
|
||||
}
|
||||
|
||||
function hallo() {
|
||||
return "hallo";
|
||||
}
|
||||
|
||||
public function getRequestTime(): string {
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
$timestamp = $_SERVER['REQUEST_TIME'] ?? time();
|
||||
@@ -147,6 +143,10 @@ class getSpecificData {
|
||||
return "Untrusted";
|
||||
}
|
||||
|
||||
function test() {
|
||||
return "TEST";
|
||||
}
|
||||
|
||||
public function getAllData(): array {
|
||||
return [
|
||||
'Document-Root' => $this->getDocumentRoot(),
|
||||
@@ -185,4 +185,4 @@ class getSpecificData {
|
||||
}
|
||||
echo "</pre>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,11 +20,30 @@ class UserController {
|
||||
);
|
||||
}
|
||||
|
||||
public function UpdateUser() {
|
||||
|
||||
}
|
||||
|
||||
public function DeleteUSer() {
|
||||
|
||||
}
|
||||
|
||||
public function CheckUser($login, $passwort) {
|
||||
|
||||
$user = DatabaseShow(
|
||||
"Benutzer",
|
||||
"*",
|
||||
"NAME = ? OR EMAIL = ?",
|
||||
$login,
|
||||
$login
|
||||
);
|
||||
|
||||
if (empty($user)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$user = $user[0];
|
||||
|
||||
if (password_verify($passwort, $user['PASSWORD'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user