When i put some php files in the userspice directory and flag them as private in the settings even then they can be used by anyone (no login required why??) Can anyone please help me out
You are not calling the securePage function on the pages.
I do not understand what do you mean by secure function but i can not use this code given on homepage of userspice installation
$abs_us_root.$us_url_root.'users/includes/header.php';
require_once $abs_us_root.$us_url_root.'users/includes/navigation.php';
if (!securePage($_SERVER['PHP_SELF'])){die();
You don't need the header and the nav to use securePage. As long as you call init.php you can use the functions, which means you need to use securePage. Otherwise the pages won't be protected.