Authmanager Revoke Function Not Working.


i’m trying to impliment a “ban” on a user when an admin clicks “ban this user”… here’s the code.

public function actionBan($id)



                        if($model->muted==1) { $model->roles_id=5; //you can only ban when they're already muted

                        $model->LastUpdate=time(); //LastUpdate from the database.

			if($model->save()) {


                                $auth->revoke(Yii::app()->user->role,$model->id); //role is assigned to user upon login.



                        }} else throw new Exception('Banning a User', 'Can\'t ban a user unless they are muted first.');