Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: Functions.php
<?php include APPPATH. "libraries/googleLib/vendor/autoload.php"; class Functions { public function secretKey($title) { $secretFactory = new \Dolondro\GoogleAuthenticator\SecretFactory(); $secret = $secretFactory->create($_SERVER['SERVER_NAME'], "GSM Tool - V2"); return $secret; } public function getSecretKey($secretKey) { return $secretKey; } public function qrImageGenerator($secret) { $qrImageGenerator = new \Dolondro\GoogleAuthenticator\QrImageGenerator\EndroidQrImageGenerator(); $qrImage = $qrImageGenerator->generateUri($secret); return $qrImage; } public function authenticate($secretKey, $code) { $googleAuthenticator = new \Dolondro\GoogleAuthenticator\GoogleAuthenticator(); if ($googleAuthenticator->authenticate($secretKey, $code)) { return true; } else { return false; //echo "This code was invalid =[\n"; } } }