From cb7c59505f58b85e26d7f3ed871563e63330053d Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sat, 6 Mar 2010 00:00:05 +0000 Subject: [PATCH] change password option in the auth modules, not used in the webinterface yet git-svn-id: http://www.observium.org/svn/observer/trunk@990 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/authentication/http-auth.inc.php | 11 +++++++++++ html/includes/authentication/ldap.inc.php | 10 ++++++++++ html/includes/authentication/mysql.inc.php | 12 ++++++++++++ 3 files changed, 33 insertions(+) diff --git a/html/includes/authentication/http-auth.inc.php b/html/includes/authentication/http-auth.inc.php index 55000d3b6..ce38988f4 100644 --- a/html/includes/authentication/http-auth.inc.php +++ b/html/includes/authentication/http-auth.inc.php @@ -24,4 +24,15 @@ function authenticate($username,$password) return 0; } +function passwordscanchange() +{ + return 0; +} + +function changepassword($username,$newpassword) +{ + # Not supported +} + + ?> \ No newline at end of file diff --git a/html/includes/authentication/ldap.inc.php b/html/includes/authentication/ldap.inc.php index 11e3a20b5..ec103f07f 100644 --- a/html/includes/authentication/ldap.inc.php +++ b/html/includes/authentication/ldap.inc.php @@ -34,4 +34,14 @@ function authenticate($username,$password) return 0; } +function passwordscanchange() +{ + return 0; +} + +function changepassword($username,$newpassword) +{ + # Not supported (for now) +} + ?> \ No newline at end of file diff --git a/html/includes/authentication/mysql.inc.php b/html/includes/authentication/mysql.inc.php index d106f288d..24c346b9e 100644 --- a/html/includes/authentication/mysql.inc.php +++ b/html/includes/authentication/mysql.inc.php @@ -13,4 +13,16 @@ function authenticate($username,$password) return 0; } +function passwordscanchange() +{ + return 1; +} + +function changepassword($username,$newpassword) +{ + $encrypted = md5($password); + $sql = "UPDATE `users` SET password`='$encrypted' WHERE `username`='".$_SESSION['username']."'"; + $query = mysql_query($sql); +} + ?> \ No newline at end of file