Esempio n. 1
0
 /** 
  * findUserAttr User and Employe
  * @author ptrnov  <*****@*****.**>
  * @since 1.1
  */
 public function findUserAttr($id)
 {
     $model = Userlogin::find()->select('*')->joinWith('userprofile', true, 'LEFT JOIN')->Where(['dbm001.user.id' => $id]);
     //->one();
     if ($model !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Esempio n. 2
0
 public function getUser()
 {
     return $this->hasOne(Userlogin::className(), ['id' => 'USER_ID']);
 }