[Openupload-svn-update] SF.net SVN: openupload:[142] trunk/lib/modules
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-11-13 19:46:57
|
Revision: 142
http://openupload.svn.sourceforge.net/openupload/?rev=142&view=rev
Author: tsdogs
Date: 2008-11-13 19:46:51 +0000 (Thu, 13 Nov 2008)
Log Message:
-----------
fix password change problems
Modified Paths:
--------------
trunk/lib/modules/auth/default.inc.php
trunk/lib/modules/default/auth.inc.php
Modified: trunk/lib/modules/auth/default.inc.php
===================================================================
--- trunk/lib/modules/auth/default.inc.php 2008-11-12 18:56:31 UTC (rev 141)
+++ trunk/lib/modules/auth/default.inc.php 2008-11-13 19:46:51 UTC (rev 142)
@@ -47,7 +47,7 @@
$this->db->insert('users',$user,$this->userfields);
}
- function useredit($user,$pwd = false) {
+ function useredit(&$user,$pwd = false) {
if ($pwd) {
$user['password']=crypt($user['password']);
}
Modified: trunk/lib/modules/default/auth.inc.php
===================================================================
--- trunk/lib/modules/default/auth.inc.php 2008-11-12 18:56:31 UTC (rev 141)
+++ trunk/lib/modules/default/auth.inc.php 2008-11-13 19:46:51 UTC (rev 142)
@@ -247,6 +247,7 @@
$user['email']=$_POST['useremail'];
if ($_POST['newpassword']!='') {
$error = false;
+ $pwd = false;
if (strlen($_POST['newpassword'])<5) {
app()->error(tr('Password must be at least 5 charaters long!'));
$error = true;
@@ -259,10 +260,11 @@
} else {
app()->message(tr('Password has been changed!'));
$user['password']=$_POST['newpassword'];
+ $pwd = true;
}
}
if (!$error) {
- app()->auth->useredit($user,true);
+ app()->auth->useredit($user,$pwd);
app()->user->set($user);
$this->nextStep(1);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|