mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
- bug 172 fixed: crash when changing password with an external users
table. The same kind of correction was also made in picture.php and register.php. git-svn-id: http://piwigo.org/svn/trunk@902 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2005-10-18 Pierrick LE GALL
|
||||
|
||||
* bug 172 fixed: crash when changing password with an external
|
||||
users table. The same kind of correction was also made in
|
||||
picture.php and register.php.
|
||||
|
||||
2005-10-18 Pierrick LE GALL
|
||||
|
||||
* bug 159 and 166 fixed: parameter "options" for mail() function
|
||||
|
||||
@@ -345,7 +345,7 @@ if ( isset( $_POST['content'] ) && !empty($_POST['content']) )
|
||||
{
|
||||
$query = 'SELECT COUNT(*) AS user_exists';
|
||||
$query.= ' FROM '.USERS_TABLE;
|
||||
$query.= " WHERE username = '".$author."'";
|
||||
$query.= ' WHERE '.$conf['user_fields']['username']." = '".$author."'";
|
||||
$query.= ';';
|
||||
$row = mysql_fetch_array( pwg_query( $query ) );
|
||||
if ( $row['user_exists'] == 1 )
|
||||
|
||||
@@ -77,7 +77,7 @@ if (isset($_POST['validate']))
|
||||
|
||||
// changing password requires old password
|
||||
$query = '
|
||||
SELECT password
|
||||
SELECT '.$conf['user_fields']['password'].' AS password
|
||||
FROM '.USERS_TABLE.'
|
||||
WHERE '.$conf['user_fields']['id'].' = \''.$userdata['id'].'\'
|
||||
;';
|
||||
|
||||
@@ -47,12 +47,7 @@ if (isset($_POST['submit']))
|
||||
|
||||
if (count($errors) == 0)
|
||||
{
|
||||
$query = '
|
||||
SELECT id
|
||||
FROM '.USERS_TABLE.'
|
||||
WHERE username = \''.$_POST['login'].'\'
|
||||
;';
|
||||
list($user_id) = mysql_fetch_array(pwg_query($query));
|
||||
$user_id = get_userid($_POST['login']);
|
||||
$session_id = session_create($user_id, $conf['session_length']);
|
||||
$url = 'category.php?id='.$session_id;
|
||||
redirect($url);
|
||||
|
||||
Reference in New Issue
Block a user