|
|
@@ -24,8 +24,8 @@ class Googlecode extends Backend
|
|
|
$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();
|
|
|
- Admin::where(['id'=> $this->auth->id])->update(['google_key'=> $secret,'updatetime'=>time()]);
|
|
|
+ $googleKey = $google->createSecret();
|
|
|
+ Admin::where(['id'=> $this->auth->id])->update(['google_key'=> $googleKey,'updatetime'=>time()]);
|
|
|
}
|
|
|
$config = Config::getConfigByGroup('basic');
|
|
|
$siteName = isset($config['name'])? $config['name']['value'] : '茶马古道';
|