HOW TO FIX PHP ERROR: Fatal error: Call to a member function users()
<p>Someone can help me fix that error:</p>

<p>Fatal error: Call to a member function users() on a non-object in /home/ultra/public_html/clasic/classes/auth.php on line 41 </p>

<p>LINE 41: $Var_528->users();
         $usr = $Var_528; </p>

<p>`

<pre><code>class auth
{

    public function auth( )
    {
    }

    public function haslogin( )
    {
        $this-&gt;username = $_POST[$this-&gt;post_index['user']];
        if ( $_POST[$this-&gt;post_index['pass']] )
        {
            $this-&gt;passhash = users::encode( @$_POST[$this-&gt;post_index['pass']] );
        }
        $this-&gt;username = $this-&gt;_stripslashes( $this-&gt;username );
        $this-&gt;passhash = $this-&gt;_stripslashes( $this-&gt;passhash );
        return $this-&gt;checklogin( $this-&gt;username, $this-&gt;passhash );
    }

    public function checklogin( $user = null, $passhash = null )
    {
        if ( $user === null )
        {
            $user = $this-&gt;username;
        }
        if ( $passhash === null )
        {
            $passhash = $this-&gt;passhash;
        }
        global $config_abs_path;
        require_once( $config_abs_path."/classes/users.php" );
        $Var_528-&gt;users();
        $usr = $Var_528;
        return validAccount( $user, $passhash );
    }

    public function checkidentity( $user = null, $identity = null )
    {
        if ( $user === null )
        {
            $user = $this-&gt;username;
        }
        global $config_abs_path;
        require_once( $config_abs_path."/classes/users.php" );
        $Var_360-&gt;users( );
        $usr = $Var_360;
        return checkIdentity( $user, $identity );
    }

    public function savelogin( $ip, $uid = null, $provider = null )
    {
        global $db;
        $_SESSION[$this-&gt;session_index['user']] = $this-&gt;username;
        $_SESSION[$this-&gt;session_index['pass']] = $this-&gt;passhash;
        if ( $uid )
        {
            $_SESSION[$this-&gt;session_index['user']] = $uid;
        }
        if ( $provider )
        {
            $this-&gt;username = $uid;
            $_SESSION[$this-&gt;session_index['user']] = $uid;
            $_SESSION[$this-&gt;session_index['pass']] = users::encode( $provider );
            $_SESSION['provider'] = $provider;
        }
        else
        {
            $_SESSION['provider'] = null;
            $_SESSION['identity'] = null;
        }
        $timestamp = date( "Y-m-d H:i:s" );
        $res = query( "insert into ".TABLE_LOGIN_HISTORY." set username='{$this-&gt;username}', date_login = '{$timestamp}', ip = '{$ip}', succeeded = 1" );
        admin_clearlogin( );
    }

    public function saveidentitylogin( $ip, $username, $auth_provider, $identity )
    {
        global $db;
        $arr = users::getUserPassWithIdentity( $identity, $auth_provider );
        $this-&gt;username = $arr['username'];
        $_SESSION[$this-&gt;session_index['user']] = $arr['username'];
        $_SESSION[$this-&gt;session_index['pass']] = $arr['password'];
        $_SESSION['provider'] = $auth_provider;
        $_SESSION['identity'] = $identity;
        $timestamp = date( "Y-m-d H:i:s" );
        $res = query( "insert into ".TABLE_LOGIN_HISTORY." set username='{$this-&gt;username}', date_login = '{$timestamp}', ip = '{$ip}', succeeded = 1" );
        admin_clearlogin( );
    }

    public function savefailedlogin( $ip )
    {
        global $db;
        $timestamp = date( "Y-m-d H:i:s" );
        $res = query( "insert into ".TABLE_LOGIN_HISTORY." set username = '{$this-&gt;username}', date_login = '{$timestamp}', `ip` = '{$ip}', succeeded = 0" );
    }

    public function autologin( $user_id )
    {
        $Var_48-&gt;users( );
        $usr = $Var_48;
        $username = getUsername( $user_id );
        $passhash = getPassHash( $user_id );
        $_SESSION[$this-&gt;session_index['user']] = $username;
        $_SESSION[$this-&gt;session_index['pass']] = $passhash;
        global $db;
        $external = fetchAssoc( "select `identity`, `auth_provider` from ".TABLE_USERS." where id='{$user_id}'" );
        if ( $external )
        {
            $_SESSION[$this-&gt;session_index['pass']] = $passhash;
            if ( isset( $external['provider'] ) )
            {
                $_SESSION['provider'] = $external['provider'];
            }
            if ( isset( $external['identity'] ) )
            {
                $_SESSION['identity'] = $external['identity'];
            }
        }
        else
        {
            $_SESSION['provider'] = null;
            $_SESSION['identity'] = null;
        }
    }

    public function expire( $time )
    {
        $this-&gt;expire = $time;
        session_cache_limiter( "private" );
        session_cache_expire( $time / 60 );
    }

    public function clearlogin( )
    {
        unset( $_SESSION[$this-&gt;session_index['user']] );
        unset( $_SESSION[$this-&gt;session_index['pass']] );
    }

    public function _stripslashes( $text )
    {
        if ( get_magic_quotes_gpc( ) )
        {
            $text = stripslashes( $text );
        }
        return $text;
    }

    public function loggedin( )
    {
        if ( !isset( $_SESSION[$this-&gt;session_index['user']] ) || !isset( $_SESSION[$this-&gt;session_index['pass']] ) )
        {
            return 0;
        }
        if ( !checklogin( $_SESSION[$this-&gt;session_index['user']], $_SESSION[$this-&gt;session_index['pass']] ) )
        {
            return 0;
        }
        return $_SESSION[$this-&gt;session_index['user']];
    }

    public function crtuser( )
    {
        return $_SESSION[$this-&gt;session_index['user']];
    }

    public function crtuserid( )
    {
        global $config_abs_path;
        require_once( $config_abs_path."/classes/users.php" );
        if ( !isset( $_SESSION[$this-&gt;session_index['user']] ) )
        {
            return 0;
        }
        $username = $_SESSION[$this-&gt;session_index['user']];
        $identity = $_SESSION['identity'];
        $Var_576-&gt;$auth-&gt;users( );
        $usr = $Var_576;
        $user_id = getUserId( $username, $identity );
        return $user_id;
    }

    public function admin_haslogin( )
    {
        $this-&gt;username = $_POST[$this-&gt;admin_post_index['user']];
        $this-&gt;passhash = settings::encode( @$_POST[$this-&gt;admin_post_index['pass']] );
        $this-&gt;username = _stripslashes( $this-&gt;username );
        $this-&gt;passhash = _stripslashes( $this-&gt;passhash );
        return admin_checklogin( $this-&gt;username, $this-&gt;passhash );
    }

    public function admin_checklogin( $user = null, $passhash = null )
    {
        if ( $user === null )
        {
            $user = $this-&gt;username;
        }
        if ( $passhash === null )
        {
            $passhash = $this-&gt;passhash;
        }
        if ( !$user || !$passhash )
        {
            return 0;
        }
        global $settings;
        $admin_user = $settings['admin_username'];
        $admin_password = $settings['admin_password'];
        if ( $admin_user == $user &amp;&amp; $admin_password == $passhash )
        {
            return 1;
        }
        return 0;
    }

    public function admin_savelogin( $ip )
    {
        global $db;
        $_SESSION[$this-&gt;admin_session_index['user']] = $this-&gt;username;
        $_SESSION[$this-&gt;admin_session_index['pass']] = $this-&gt;passhash;
        $_SESSION['provider'] = null;
        $_SESSION['identity'] = null;
        $timestamp = date( "Y-m-d H:i:s" );
        $res = query( "insert into ".TABLE_LOGIN_HISTORY." set username = '{$this-&gt;username}', date_login = '{$timestamp}', `ip` = '{$ip}', succeeded = 1" );
        clearlogin( );
    }

    public function adminloggedin( )
    {
        if ( !isset( $_SESSION[$this-&gt;admin_session_index['user']] ) || !isset( $_SESSION[$this-&gt;admin_session_index['pass']] ) )
        {
            return 0;
        }
        if ( !admin_checklogin( $_SESSION[$this-&gt;admin_session_index['user']], $_SESSION[$this-&gt;admin_session_index['pass']] ) )
        {
            return 0;
        }
        return 1;
    }

    public function admin_clearlogin( )
    {
        if ( isset( $_SESSION[$this-&gt;admin_session_index['user']] ) )
        {
            unset( $_SESSION[$this-&gt;admin_session_index['user']] );
        }
        if ( isset( $_SESSION[$this-&gt;admin_session_index['pass']] ) )
        {
            unset( $_SESSION[$this-&gt;admin_session_index['pass']] );
        }
    }

    public function getlastlogin( $username )
    {
        global $db;
        global $appearance_settings;
        $date_format = $appearance_settings['date_format_long'];
        $arr = array( );
        $arr = fetchAssoc( "select date_format(date_login, '{$date_format}') as date_login_nice, ip from ".TABLE_LOGIN_HISTORY." where username like '{$username}' and succeeded = 1 order by date_login desc limit 1" );
        return $arr;
    }

    public function getloginbefore( $username )
    {
        global $db;
        global $appearance_settings;
        $date_format = $appearance_settings['date_format_long'];
        $arr = array( );
        $arr = fetchAssoc( "select date_format(date_login, '{$date_format}') as date_login_nice, ip from ".TABLE_LOGIN_HISTORY." where username like '{$username}' and succeeded = 1 order by date_login desc limit 1,1 " );
        return $arr;
    }

    public function authcount( $user )
    {
        global $db;
        $count = fetchRow( "select count(*) from ".TABLE_LOGIN_HISTORY." where username like '{$user}'" );
        return $count;
    }

    public function getnoauthpages( $user, $no_per_page )
    {
        $total = authCount( $user );
        if ( $total == 0 )
        {
            return 1;
        }
        return ceil( $total / $no_per_page );
    }

    public function getloginhistory( $user, $page, $no_per_page )
    {
        $start = ( $page - 1 ) * $no_per_page;
        global $appearance_settings;
        global $db;
        $date_format = $appearance_settings['date_format_long'];
        $arr = fetchAssocList( "select *, date_format(date_login, '{$date_format}') as date_login_nice from ".TABLE_LOGIN_HISTORY." where username like '{$user}' order by date_login desc limit {$start}, {$no_per_page}" );
        $i = 0;
        $array = array( );
        foreach ( $arr as $result )
        {
            $array[$i] = $result;
            if ( $i % 2 )
            {
                $array[$i]['style'] = "_odd";
            }
            else
            {
                $array[$i]['style'] = "_even";
            }
            ++$i;
        }
        return $array;
    }

    public function deleteloginhistory( $user )
    {
        global $db;
        query( "delete from ".TABLE_LOGIN_HISTORY." where username like '{$user}'" );
        return 1;
    }

    public function geterror( )
    {
        return $this-&gt;error;
    }

    public function adderror( $str )
    {
        $this-&gt;error .= $str;
    }

    public function seterror( $str )
    {
        $this-&gt;error = $str;
    }

}

?&gt;`
</code></pre>

<p>Thanks all for help! ;)</p>
