dever 4 years ago
parent
commit
a94080a125
2 changed files with 12 additions and 1 deletions
  1. 11 0
      database/user.php
  2. 1 1
      src/Api.php

+ 11 - 0
database/user.php

@@ -566,5 +566,16 @@ return array
 			'limit' => '0,1000',
 			'col' => 'username as name, id, id as value, "" as selected, "" as disabled|id',
 		),
+
+		# 获取基本常用的信息
+		'getOne' => array
+		(
+			'option' => array
+			(
+				'id' => 'yes',
+			),
+			'type' => 'one',
+			'col' => 'id,username,avatar,sex,truename,area,mobile,area_id,address,address_contact,address_mobile,info',
+		),
 	),
 );

+ 1 - 1
src/Api.php

@@ -10,7 +10,7 @@ class Api
 
     public function info($uid)
     {
-        $info = Dever::db('passport/user')->one($uid);
+        $info = Dever::db('passport/user')->getOne($uid);
         if ($info) {
         	$info['name'] = '';
         	if ($info['truename']) {