Skip to content
Snippets Groups Projects
Commit 3669b24e authored by Sibidharan's avatar Sibidharan :speech_balloon:
Browse files

re arch

parent 7515e2c5
No related branches found
No related tags found
No related merge requests found
Showing
with 21 additions and 17 deletions
File moved
File moved
File moved
File moved
File moved
File moved
File moved
<?php <?php
$login = true; $login = true;
Session::set('mode', 'web');
Session::set('test', 'websdkjfnsdkjfn');
if (isset($_POST['email_address']) and isset($_POST['password'])) { if (isset($_POST['email_address']) and isset($_POST['password'])) {
$email_address = $_POST['email_address']; $email_address = $_POST['email_address'];
$password = $_POST['password']; $password = $_POST['password'];
Session::start();
$result = UserSession::authenticate($email_address, $password); $result = UserSession::authenticate($email_address, $password);
$login = false; $login = false;
} }
if (!$login) { if (!$login) {
if ($result){ if ($result) {
?> ?>
<script>window.location.href = "<?=get_config('base_path')?>"</script> <script>
window.location.href = "<?=get_config('base_path')?>"
<? </script>
} else {
?> <?php
<main class="container"> } else {
?>
<main class="container">
<div class="bg-light p-5 rounded mt-3"> <div class="bg-light p-5 rounded mt-3">
<h1>Login Failed</h1> <h1>Login Failed</h1>
<p class="lead">This example is a quick exercise to do basic login with html forms.</p> <p class="lead">This example is a quick exercise to do basic login with html forms.</p>
</div> </div>
</main> </main>
<?php <?php
} }
} else { } else {
?> ?>
<main class="form-signin"> <main class="form-signin">
...@@ -55,4 +59,4 @@ if (!$login) { ...@@ -55,4 +59,4 @@ if (!$login) {
</main> </main>
<?php <?php
} }
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment