Xataface 2.0
Xataface Application Framework
actions/my_profile.php
Go to the documentation of this file.
00001 <?php
00002 class dataface_actions_my_profile {
00003         function handle(&$params){
00004                 $app =& Dataface_Application::getInstance();
00005                 $auth =& Dataface_AuthenticationTool::getInstance();
00006                 
00007                 if ( $auth->isLoggedIn() ){
00008                         // forward to the user's profile
00009                         $user =& $auth->getLoggedInUser();
00010                         $app->redirect($user->getURL());
00011                         exit;
00012                 } else {
00013                         $app->redirect($app->url('-action=login_prompt').'&--msg='.urlencode('Sorry, this action is only available to logged in users'));
00014                 }
00015         }
00016 }
 All Data Structures Namespaces Files Functions Variables Enumerations