problem with login
metodman / 1 decade ago (27 November 2005 04:24)
sorry,
but I have a problem with the login action, if you try to log with an unregistred account you can post comment...I have checked the newman_lib script and it stop only the empty login post:
if (empty($GLOBALS[´login´]))
echo _PLEASE_LOGIN_FIRST;
else
how can we stop all the unregistred users???
HELP me!
if the bug is fixed in an other thread or post, please repost the link because I don´t find anything about this with the site search engine.
Reply by: polaris
In newman_lib.php file you should check for line 493 (or near by), for there peace of code
-------------------------------------------------------------------------------
if (empty($GLOBALS[´login´]))
echo _PLEASE_LOGIN_FIRST; //echo ´Please login first! If you still dont have an account, register it here´;
else
{
?>
-------------------------------------------------------------------------------
Change it to look like this:
-------------------------------------------------------------------------------
$passek = CheckLogin($GLOBALS[´login´],$GLOBALS[´pass´]);
if ($passek <> "ok" )
echo _PLEASE_LOGIN_FIRST; //echo ´Please login first! If you still dont have an account, register it here´;
else if ($passek == "ok" )
{
?>
-------------------------------------------------------------------------------
Save and exit. Try now.
Regards.