|
|
@@ -454,13 +454,13 @@ class UserClass extends BaseClass
|
|
|
public static function replaceUser($info)
|
|
|
{
|
|
|
$mobile = $info['mobile'] ?? '';
|
|
|
- if (isset($info['name']) && !empty($info['name'])) {
|
|
|
- $name = $info['name'] ?? '';
|
|
|
+ if (!empty($info['name'])) {
|
|
|
+ $name = $info['name'];
|
|
|
} else {
|
|
|
- $name = '手机尾号' . substr($mobile, -4);
|
|
|
+ $name = '尾号' . substr($mobile, -4);
|
|
|
}
|
|
|
$miniOpenId = $info['miniOpenId'] ?? '';
|
|
|
- if (stringUtil::isMobile($mobile) == false) {
|
|
|
+ if (!stringUtil::isMobile($mobile)) {
|
|
|
util::fail('手机号错误');
|
|
|
}
|
|
|
$user = self::getByCondition(['mobile' => $mobile], true);
|