2
Without the complete error message, it's impossible to tell what's causing it.
One possibility is that a method (member function) is called on an object, such as $xoopsUser, within a function, and $xoopsUser is not declared as global within the function.
Another possibility is that the include-file that defines the object in question is not being included.