From: Victor B. <vb...@us...> - 2005-04-27 13:31:16
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13078/core Modified Files: current_user_api.php Log Message: Fixed #5526: current_user_is_anonymous() returns true when it should not Index: current_user_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/current_user_api.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- current_user_api.php 13 Feb 2005 21:36:37 -0000 1.27 +++ current_user_api.php 27 Apr 2005 13:31:06 -0000 1.28 @@ -91,7 +91,8 @@ # Return true if the currently user is the anonymous user function current_user_is_anonymous() { if ( auth_is_user_authenticated() ) { - return current_user_get_field( 'username' ) == config_get( 'anonymous_account' ); + return ( ( ON == config_get( 'allow_anonymous_login' ) ) && + ( current_user_get_field( 'username' ) == config_get( 'anonymous_account' ) ) ); } else { return false; |