Appropriate way to load authenticated user info


class WebUser extends CWebUser{

    protected function afterLogin($fromCookie)


        $criteria = new CDbCriteria;

        $criteria->condition = "email=:email";

        $criteria->params = array(":email"=>$this->getName());




So whenever i want to get current user info (filled from db), i will do:


I think this is not the correct way…

What do you think?

just Yii::app()->user->userObject will do

So i’m doing it in the right place.

Thank you!