Changeset 902


Ignore:
Timestamp:
Oct 19, 2005, 12:29:21 AM (19 years ago)
Author:
plg
Message:
  • 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.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/ChangeLog

    r901 r902  
     12005-10-18 Pierrick LE GALL
     2
     3        * bug 172 fixed: crash when changing password with an external
     4        users table. The same kind of correction was also made in
     5        picture.php and register.php.
     6
    172005-10-18 Pierrick LE GALL
    28
  • trunk/picture.php

    r891 r902  
    346346    $query = 'SELECT COUNT(*) AS user_exists';
    347347    $query.= ' FROM '.USERS_TABLE;
    348     $query.= " WHERE username = '".$author."'";
     348    $query.= ' WHERE '.$conf['user_fields']['username']." = '".$author."'";
    349349    $query.= ';';
    350350    $row = mysql_fetch_array( pwg_query( $query ) );
  • trunk/profile.php

    r854 r902  
    7878    // changing password requires old password
    7979    $query = '
    80 SELECT password
     80SELECT '.$conf['user_fields']['password'].' AS password
    8181  FROM '.USERS_TABLE.'
    8282  WHERE '.$conf['user_fields']['id'].' = \''.$userdata['id'].'\'
  • trunk/register.php

    r850 r902  
    4848  if (count($errors) == 0)
    4949  {
    50     $query = '
    51 SELECT id
    52   FROM '.USERS_TABLE.'
    53   WHERE username = \''.$_POST['login'].'\'
    54 ;';
    55     list($user_id) = mysql_fetch_array(pwg_query($query));
     50    $user_id = get_userid($_POST['login']);
    5651    $session_id = session_create($user_id, $conf['session_length']);
    5752    $url = 'category.php?id='.$session_id;
Note: See TracChangeset for help on using the changeset viewer.