PHP code example of hehongyuanlove / flarum-auth-qq
1. Go to this page and download the library: Download hehongyuanlove/flarum-auth-qq library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hehongyuanlove / flarum-auth-qq example snippets
$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);