I've made a page.php (entirely in php, by hand, so independant from my symfony project) file in the web directory called by an ajax action in my module I'd like to make sure tht my user is au开发者_如何学Cthenticated before going further in my page.php file
I've tried $sf_user->isAuthenticated() but as you can imagine the sf_user variabe is undefined.. How can I make my page.php file recognize $sf_user, or, how, in php, can I write the equivalence of $sf_user->isAuthenticated ?
Thank you !
Create a small class in lib/ where you can check if the user is logged in, if he is, redirect to page.php.
You could use session variables ? or post the isAuthenticated variable to the page.php file ?
精彩评论