Example #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(['user.id' => $id]);
     //->one();
     if ($model !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Example #2
0
 /**
  * CLASS TABLE FIND PrimaryKey
  * Example:  Employe::find()
  */
 protected function findModel($id)
 {
     if (($model = Userlogin::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }