Fixed bogus login problem.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@758 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
eb722aceba
commit
a407c677d9
|
@ -28,13 +28,13 @@ function userLogin( $username, $password )
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$HTTP_SESSION_VARS['username'] = $username;
|
$HTTP_SESSION_VARS['username'] = $username;
|
||||||
$HTTP_SESSION_VARS['password'] = $password;
|
$HTTP_SESSION_VARS['password'] = $password;
|
||||||
if ( $user = mysql_fetch_assoc( $result ) )
|
if ( $db_user = mysql_fetch_assoc( $result ) )
|
||||||
{
|
{
|
||||||
$HTTP_SESSION_VARS['user'] = $user;
|
$HTTP_SESSION_VARS['user'] = $user = $db_user;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$HTTP_SESSION_VARS['user'] = array();
|
unset( $user );
|
||||||
}
|
}
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,10 @@ if ( ZM_OPT_USE_AUTH )
|
||||||
$user = $HTTP_SESSION_VARS['user'];
|
$user = $HTTP_SESSION_VARS['user'];
|
||||||
define( "ZMU_COMMAND", ZMU_PATH." -U ".$HTTP_SESSION_VARS['username']." -P ".$HTTP_SESSION_VARS['password'] );
|
define( "ZMU_COMMAND", ZMU_PATH." -U ".$HTTP_SESSION_VARS['username']." -P ".$HTTP_SESSION_VARS['password'] );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset( $user );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue