summaryrefslogtreecommitdiffstats
path: root/login.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-20 09:12:04 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-20 09:12:04 +0000
commit7e1432273ab146abfcce8f226a9bc79eb1f25393 (patch)
tree3f804a8849b31a1fa237754c026f81d60973b5da /login.php
parent897b35aeddd117409af95b270ec8309c2a564aaa (diff)
downloadampache-7e1432273ab146abfcce8f226a9bc79eb1f25393.tar.gz
ampache-7e1432273ab146abfcce8f226a9bc79eb1f25393.tar.bz2
ampache-7e1432273ab146abfcce8f226a9bc79eb1f25393.zip
API and XML-RPC are still broken, but moved to new session code, sleep time
Diffstat (limited to 'login.php')
-rw-r--r--login.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/login.php b/login.php
index 95184aa0..553e8df3 100644
--- a/login.php
+++ b/login.php
@@ -25,7 +25,7 @@ require_once 'lib/init.php';
/* We have to create a cookie here because IIS
* can't handle Cookie + Redirect
*/
-vauth_session_cookie();
+vauth::create_cookie();
Preference::init();
/**
@@ -48,11 +48,7 @@ unset($auth);
if ($_POST['username'] && $_POST['password']) {
if ($_POST['rememberme']) {
- $extended = vauth_conf('remember_length');
- vauth_conf(array('cookie_life'=>$extended),1);
- $cookie_name = vauth_conf('session_name') . "_remember";
- $cookie_life = time() + $extended;
- setcookie($cookie_name, '1', $cookie_life,'/',vauth_conf('cookie_domain'));
+ vauth::create_remember_cookie();
}
/* If we are in demo mode let's force auth success */
@@ -65,7 +61,7 @@ if ($_POST['username'] && $_POST['password']) {
else {
$username = scrub_in($_POST['username']);
$password = scrub_in($_POST['password']);
- $auth = authenticate($username, $password);
+ $auth = vauth::authenticate($username, $password);
$user = User::get_from_username($username);
if ($user->disabled == '1') {
@@ -105,7 +101,7 @@ if ($_POST['username'] && $_POST['password']) {
if ($auth['success']) {
// $auth->info are the fields specified in the config file
// to retrieve for each user
- vauth_session_create($auth);
+ vauth::session_create($auth);
// Generate the user we need for a few things
$user = User::get_from_username($username);