PHP code example of minr / flarum-ext-auth-weibo

1. Go to this page and download the library: Download minr/flarum-ext-auth-weibo 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/ */

    

minr / flarum-ext-auth-weibo example snippets


'regex:/^[-_a-zA-Z0-9\x7f-\xff]+$/i',

/**
 * @param string $username
 * @return $this
 */
public function suggestUsername(string $username): self{
    // $username = preg_replace('/[^a-z0-9-_]/i', '', $username);
    return $this->suggest('username', $username);
}