diff --git a/app/Models/User.php b/app/Models/User.php
index d4a4f8e..3b99f50 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -65,8 +65,8 @@ class User extends Model
$key_match = str_replace("%", "", $key);
$key_match = str_replace("m", "", $key_match);
$md5 = substr(MD5($this->attributes['id'].$this->attributes['passwd'].$this->attributes['method'].$this->attributes['obfs'].$this->attributes['protocol']),
- ($key_match < 0 ? $key_match : 0),
- abs($key_match));
+ ($key_match < 0 ? $key_match : 0),
+ abs($key_match));
$str = str_replace($key, $md5, $str);
}
return $str;
@@ -284,17 +284,17 @@ class User extends Model
$im_value = $this->attributes['im_value'];
switch($this->attributes['im_type']) {
case 1:
- $im_type = '微信';
- break;
+ $im_type = '微信';
+ break;
case 2:
- $im_type = 'QQ';
- break;
+ $im_type = 'QQ';
+ break;
case 3:
- $im_type = 'Google+';
- break;
+ $im_type = 'Google+';
+ break;
default:
- $im_type = 'Telegram';
- $im_value = ''.$im_value.'';
+ $im_type = 'Telegram';
+ $im_value = ''.$im_value.'';
}
$ref_user = User::find($this->attributes['ref_by']);
@@ -316,11 +316,22 @@ class User extends Model
$location=$iplocation->getlocation($reg_location);
$reg_location .= "\n".iconv('gbk', 'utf-8//IGNORE', $location['country'].$location['area']);
- $return_array = Array('DT_RowId' => 'row_1_'.$id, $id, $id,$this->attributes['port'],
- $this->attributes['user_name'], $this->attributes['remark'],
- $this->attributes['method'],
- $this->online_ip_count(),
- $used_traffic, $this->attributes['reg_date'],$account_expire_in);
+ $return_array = Array('DT_RowId' => 'row_1_'.$id, $id, $id,
+ $this->attributes['user_name'], $this->attributes['remark'],
+ $this->attributes['email'], $this->attributes['money'],
+ $im_type, $im_value,
+ $this->attributes['node_group'], $account_expire_in,
+ $this->attributes['class'], $class_expire_in,
+ $this->attributes['passwd'], $this->attributes['port'],
+ $this->attributes['method'],
+ $this->attributes['protocol'], $this->attributes['obfs'],
+ $this->online_ip_count(), $this->lastSsTime(),
+ $used_traffic, $enable_traffic,
+ $this->lastCheckInTime(), $today_traffic,
+ $is_enable, $this->attributes['reg_date'],
+ $reg_location,
+ $this->attributes['auto_reset_day'], $this->attributes['auto_reset_bandwidth'],
+ $ref_user_id, $ref_user_name);
return $return_array;
}
-}
+}
\ No newline at end of file