|
|
@@ -21,7 +21,7 @@ class Googlecode extends Backend
|
|
|
*/
|
|
|
public function index(){
|
|
|
$google = new \PHPGangsta_GoogleAuthenticator();
|
|
|
- $admin = Admin::where(['id'=> $this->auth->id])->field('id,username,nickname,google_key')->find();
|
|
|
+ $admin = Admin::where(['id'=> $this->auth->id])->field('id,username,nickname,google_key,google_bind')->find();
|
|
|
$googleKey = isset($admin['google_key'])? $admin['google_key'] : '';
|
|
|
if(empty($googleKey)){
|
|
|
$secret = $google->createSecret();
|