fixed login
added example login
This commit is contained in:
parent
f00bdc99ec
commit
c7984873c0
6 changed files with 48 additions and 8 deletions
|
|
@ -4,7 +4,16 @@ use Venom\Models\User;
|
|||
use \Venom\Security\Security;
|
||||
|
||||
if (!Security::get()->hasRole(User::ADMIN_ROLE)) {
|
||||
?>
|
||||
<form method="post" action="/admin/api/login">
|
||||
<input type="text" name="USERNAME" placeholder="Username">
|
||||
<input type="password" name="PASSWORD" placeholder="Password">
|
||||
<input type="hidden" name="REDIRECT_TO" value="/admin/">
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
<?php
|
||||
echo 'Login!';
|
||||
} else {
|
||||
echo 'Admin Interface!';
|
||||
echo '<a href="/admin/api/login/logout">Ausloggen</a>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue