示例#1
0
 public function getUserName($uid)
 {
     $query = DcmdUser::findOne($uid);
     if ($query) {
         return $query['username'];
     }
     return "";
 }
示例#2
0
 public function getUserName($uid)
 {
     $ret = DcmdUser::findOne($uid);
     if ($ret) {
         return $ret['username'];
     }
     return "";
 }
示例#3
0
 public function getOprName($uid)
 {
     $query = DcmdUser::findOne($uid);
     if ($query) {
         return $query->username;
     }
     return "";
 }
示例#4
0
 public function getDepartment($uid)
 {
     $query = DcmdUser::findOne($uid);
     if (!$query) {
         return "";
     }
     $ret = DcmdDepartment::findOne($query['depart_id']);
     if (!$ret) {
         return "";
     }
     return $ret['depart_name'];
 }
 /**
  * Finds the DcmdUser model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return DcmdUser the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = DcmdUser::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }