fix: shorten avatar URL to fit VARCHAR(255) column
Previous avataaars URL with style params exceeded 280 chars, got truncated in database causing blank avatars. Shortened to ~60 chars.
This commit is contained in:
@@ -187,9 +187,9 @@ class User extends Api
|
||||
}
|
||||
// }
|
||||
$extend['pay_pwd'] = strtoupper(md5(strtoupper(md5($pwd2.'skund'))));
|
||||
// 生成随机虚拟头像 (DiceBear avataaars - 男性商务风格)
|
||||
$avatarSeed = md5(uniqid(mt_rand(), true));
|
||||
$extend['avatar'] = 'https://api.dicebear.com/9.x/avataaars/png?seed=' . $avatarSeed . '&size=200&top=shortHairShortFlat,shortHairShortRound,shortHairShortWaved,shortHairSides,shortHairTheCaesar,shortHairShortCurly&clothing=blazerAndSweater,blazerAndShirt&clothingColor=262e33,3c4f5c,65c9ff,25557c,929598';
|
||||
// 生成随机虚拟头像 (DiceBear avataaars 商务风格,URL需<255字符)
|
||||
$avatarSeed = substr(md5(uniqid(mt_rand(), true)), 0, 8);
|
||||
$extend['avatar'] = 'https://api.dicebear.com/9.x/avataaars/png?seed=' . $avatarSeed;
|
||||
$extend['referral_code'] = $this->create_invite_code(); //推荐码
|
||||
//注册钱包eth
|
||||
$ret = $this->auth->register($username, $password, $email, $mobile, $extend);
|
||||
|
||||
Reference in New Issue
Block a user