How to get the user id of the currently logged in user from inside a function in php? I know how to get it in a index.php (by getting $_SESSION[\'userid\']) but I cant get i