I am using Yiis role and permissions system in my app and I want to get the name of the assignment assigned to a user.
I am using this with no luck …
$auth = new CDbAuthManager;
It states …
Fatal error: Call to a member function createCommand() on a non-object in /Applications/MAMP/htdocs/projects/BaseApp/yii/framework/web/auth/CDbAuthManager.php on line 303
CDbAuthManager class was designed to work as a configurable application component. Do not instantiate it directly in your code.
Ok, any ideas how to get the AuthName? using built in methods in Yii and NOT direct SQL query?
getAuthAssignments() method will work, just call it on the application component.
Advice: use the Rights extension. It is awesome