title = '个人设置'; FontAwesomeAsset::register($this); JqueryAsset::register($this); SimpleWebAuthnBrowser::register($this); $this->registerCssFile('@web/css/user-info.css'); $details = IPLocation::getDetails($model->last_login_ip); // IP LOCATION // QR-CODE if (!is_null($totp_secret)) { $writer = new PngWriter(); $qrCode = QrCode::create($totp_url) ->setEncoding(new Encoding('UTF-8')) ->setErrorCorrectionLevel(ErrorCorrectionLevel::Low) ->setSize(300) ->setMargin(10) ->setRoundBlockSizeMode(RoundBlockSizeMode::Margin) ->setForegroundColor(new Color(0, 0, 0)) ->setBackgroundColor(new Color(255, 255, 255)); $result = $writer->write($qrCode); } // totp $user = new User(); // Dark Mode $darkMode = Yii::$app->user->identity->dark_mode; ?>
'要修改头像,请前往Gravatar,使用相同的电子邮箱地址创建/登录账户后对头像进行管理
使用兼容TOTP的应用程序扫描左侧二维码以添加二步验证
推荐以下二步验证器::