A Flarum extension. Allow users to log in with QQ
- 用户名进行规范(允许汉字)
- 随机生成用户名
- 自动设置邮箱账号 同时密码也为邮箱账号 且自动激活邮箱
- 邮箱与密码相同
有其他需求 自行修改vendor/hehongyuanlove/flarum-auth-qq/src/QQAuthController.php
$username = $this->RandomUserName();
$random_email = $username. "@xxxxx.cn";
$nickname = $this->UserNameMatch($userinforesult["nickname"]) . str::upper(str::random(4));
$registration
->provide("username", $username)
->provide("nickname", $nickname)
->provide("email", $random_email)
->provide("is_email_confirmed", 1)
->provide("password", $random_email)
->provideAvatar($userinforesult['figureurl_qq_2'])
->setPayload($userinforesult);
Copy from nomiscz/flarum-ext-auth-wechat
Use Bazaar or install manually with composer:
composer require hehongyuanlove/flarum-auth-qq
# 有兼容提示就
composer require hehongyuanlove/flarum-auth-qq:*
composer update hehongyuanlove/flarum-auth-qq