Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11723692
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/includes/login.php b/includes/login.php
index 3d4b486..108658e 100644
--- a/includes/login.php
+++ b/includes/login.php
@@ -1,40 +1,36 @@
<?php
/*
* Keruald, core libraries for Pluton and Xen engines.
* (c) 2010, Sébastien Santoro aka Dereckson, some rights reserved
* Released under BSD license
*
* Login and logout handler.
*
* 0.1 2010-02-27 1:52 DcK
*
*/
-$_POST['LogIn'] = "OK";
-$_POST['username'] = "demo";
-$_POST['password'] = "demo";
-
if ($_POST['LogIn']) {
//User have submitted login form
$username = $db->sql_escape($_POST['username']);
$sql = "SELECT user_password, user_id FROM " . TABLE_USERS . " WHERE username = '$username'";
if ( !($result = $db->sql_query($sql)) ) message_die(SQL_ERROR, "Can't get user information", '', __LINE__, __FILE__, $sql);
if ($row = $db->sql_fetchrow($result)) {
if (!$row['user_password']) {
//No password set
$LoginError = "This account exists but haven't a password defined. Contact the site administrator.";
} elseif ($row['user_password'] != md5($_POST['password'])) {
//The password doesn't match
$LoginError = "Incorrect password.";
} else {
//Login successful
- $Session->user_login($row['user_id']);
+ Session::load()->user_login($row['user_id']);
$LoginSuccessful = true;
}
}
} elseif ($_POST['LogOut'] || $_GET['action'] == "user.logout") {
//User have submitted logout form or clicked a logout link
- $Session->user_logout();
+ Session::load()->user_logout();
}
?>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 11:07 (19 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2990611
Default Alt Text
(1 KB)
Attached To
Mode
rK Keruald legacy core libraries
Attached
Detach File
Event Timeline
Log In to Comment