This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.
Sometimes you want your validation rules to be just a little bit more than the standard options available to you like ‘numeric’, ‘length’ or ‘safe’. Occasionally you might need a value to be unique within it’s database column and etc. Read on to see how it works.
Recently I've worked on a project where I had to upload multiple files. I've come up with a short generalized script. You can use it if you have a table with lot of file location fields/columns. I don't know if it's the best solution or not but it works great for me. so, lets start