Windows Vista

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

Windows Vista

Postby njw » Thu Sep 11, 2008 5:39 am

I have a Xataface system up and running. It works fine except when trying to access the system using a client PC running Vista.

Has anyone come across problems using Vista?

Many thanks for any help

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Sep 11, 2008 11:32 am

I don't have access to any Vista machines right now. Can you describe the problem?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

I'll try

Postby njw » Thu Sep 11, 2008 1:10 pm

but the PC the error is on is 3,000 miles away! The reported error is:

Fatal error: Call to a member function getLoggedInUser() on a non-object in /home/archomai/public_html/alcreg/tables/Student/Student.php on line 22

I usually get something like this after I log out of the system, but on first access there's a hook to force the user to the login screen.

Many thanks

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Sep 12, 2008 8:49 am

Can you post a snippet around where the error occurs (line 22 of Student.php)?

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Snippet

Postby njw » Fri Sep 12, 2008 8:59 am

Code: Select all
    function getPreferences(){
        $mytable =& Dataface_Table::loadTable('Student') ;
        $auth =& Dataface_AuthenticationTool::getInstance();
        $user =& $auth->getLoggedInUser();
        if ( $user and  $user->val('role') != 'ADMIN' ) {
        // We apply the security filter to non admin users.
            $mytable->setSecurityFilter(array('Company'=>$user->val('Company')));
        }
    return array();  // Mandatory!! getPreferences() must return array.
    }

    function beforeInsert(&$record) {
        $auth =& Dataface_AuthenticationTool::getInstance();
        $user =& $auth->getLoggedInUser();
        $record->setValue('Company', $user->val('Company'));
    }
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Sep 15, 2008 7:16 am

One observation is that the getPreferences() method should be in the applcation delegate class not the student table delegate class.

How does your hook work to force the user to the login screen?

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

It is in both

Postby njw » Mon Sep 15, 2008 8:22 am

I thought I needed it in both - I have a number of tables, some of which are available to non-Admin users and some are not.

Many thanks

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Sep 16, 2008 3:54 pm

This is very strange. The authentication tool should be available in any triggers you might have so long as your application has an [_auth] section defined in the conf.ini file.

Although, it gets instantiated inside the Dataface_Application::display() method, so if you're doing some special stuff in the index.php file before the display() method is called, then this could happen.

Tough to diagnose completely from this vantage point.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

It looks like it might have gone away

Postby njw » Wed Sep 17, 2008 12:24 am

but I'll find out when I am next out there, early next month.

Many thanks for your help

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 19 guests

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