Guest User

Untitled

a guest
Apr 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1.     public function getProfile(){
  2.        
  3.         if (!$this->isGuest && $this->_profile === null){
  4.                    $criteria = Array(
  5.                     'condition'=>'user_id = :user_id',
  6.                     'params'    =>  Array(
  7.                             ':user_id'=>$this->model->id
  8.                             )
  9.                     );
  10.            
  11.    
  12.                 $this->_profile = Profile::model()->find(new CDbCriteria( $criteria ));
  13.        
  14.         }
  15.         return $this->_profile;
  16.     }
Add Comment
Please, Sign In to add comment