Ignore:
Timestamp:
Jan 23, 2007, 2:22:52 AM (17 years ago)
Author:
rvelices
Message:
  • revert feature 564: log the login of each user; but add the possibility to be

done by a plugin

  • create a "standard" way to define PHP functions that we use but might not be

available in the current php version

  • when a comment is rejected (spam, anti-flood etc), put the content back to the

browser in case there is a real user behind it

  • now a comment can be entered only if the page was retrieved between 2 seconds

ago and 1 hour ago

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions.inc.php

    r1711 r1744  
    495495    return new PwgError(400, "This method requires POST");
    496496  }
    497 
    498   $username = $params['username'];
    499   // retrieving the encrypted password of the login submitted
    500   $query = '
    501 SELECT '.$conf['user_fields']['id'].' AS id,
    502        '.$conf['user_fields']['password'].' AS password
    503   FROM '.USERS_TABLE.'
    504   WHERE '.$conf['user_fields']['username'].' = \''.$username.'\'
    505 ;';
    506   $row = mysql_fetch_assoc(pwg_query($query));
    507 
    508   if ($row['password'] == $conf['pass_convert']($params['password']))
    509   {
    510     log_user($row['id'], false);
     497  if (try_log_user($params['username'], $params['password'],false))
     498  {
    511499    return true;
    512500  }
Note: See TracChangeset for help on using the changeset viewer.