Acessing Db In Rwebuser

Hi there!

I’m facing a very disturbing problem. I’ve coded a webpage that uses the Yii framework with the Users and Rights extensions. I’ve added some fields to the “users” table and now I want to use these fields to grant or revoke access to some parts of the webpage. I’m controlling all this through the “protected/components/WebUser.php” class, which I created following this tutorial: http://www.yiiframework.com/wiki/60/. All this works fine on localhost, but once I’ve uploaded the page, the navigator shows me this errors:




RWebUser and its behaviors do not have a method or closure named "getIdIntern". 



First of all, this is weird because my “WebUser” class extends the “CWebUser” class, so I don’t understand what the “RWebUser” class is doing here (and my “main.php” file has the ‘user class’ set to ‘WebUser’)… I’ve searched for the “protected/modules/rights/components/RWebUser.php” file and I’m adding each method to this class to prevent the error. However, some of these methods need to check some data from the database. In the “WebUser” class, I can do it like this:




function getIdIntern(){

	return $this->loadUser(Yii::app()->user->id)->idintern;

  }



However, when I try to call the "loadUser" method inside the "RWebUser" class, it gives an error. Actually I need to know a really simple thing: how can I execute a query to the database INSIDE the "RWebUser" class, so I can prevent the navigator from complaining?

I know there may be "cleaner" ways to do this, but I have the whole system running this way, so I just want to add these methods to the "RWebUser" class.

Anyone knows how to do this?

Thanks in advance for your time and effort! :)

Nevermind: it was all related with a server problem that didn’t updated the “config/main.php” file… U_U’

Solved!