-
public function getUserInfo($uid){
-
if(is_null($uid) || empty($uid)){return false;}
-
if(is_array($uid)){
-
$where['user_id'] = array('in',$uid);
-
}else{
-
$where['user_id'] = array('eq',$_SESSION['uid']);
-
}
-
return M('User')->where($where)->select();
-
}
最近在优化代码,特别实用。