How to hide menu to unlogged users

A place for users and developers of the Xataface to discuss and receive support.

How to hide menu to unlogged users

Postby yakotey » Tue May 19, 2009 6:37 am

Hi all,

I would like to know how to hide menu (tables) to unlogged users.

Thank you.
yakotey
 
Posts: 7
Joined: Mon May 18, 2009 3:21 pm

Postby silma » Fri May 22, 2009 8:54 am

What about :


Code: Select all
  function getPreferences(){
     $auth =& Dataface_AuthenticationTool::getInstance();
    $user =& $auth->getLoggedInUser();

  if ( isset($user) )
    {
      return array('show_tables_menu'=>1);  }
   

    else {
   
       return array('show_tables_menu'=>0);  }
}


in your \conf\ApplicationDelegate.php ?

Without guarantee, i'm a beginner !
:oops:
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Postby yakotey » Mon May 25, 2009 1:47 am

That worked.
Great!

Thanx man!
yakotey
 
Posts: 7
Joined: Mon May 18, 2009 3:21 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 24 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved