Closed whitsey closed 11 months ago
Hi,
Actually it is loaded. The problem is the way you instantiate the object and PHP is telling it to you Call to undefined method OTPHP\TOTP::generate()
.
generate
is available for version 11.0+ and not 10.x. The documentation for this version is available here: https://github.com/Spomky-Labs/otphp/blob/10.0.x/doc/index.md
Oh. Ok. I just followed the docs link from packagist which lead here - https://github.com/Spomky-Labs/otphp/blob/HEAD/doc/index.md
I followed that guide but looks like composer require spomky-labs/otphp
downloaded v10 (the wrong version).
Thanks for prompt response.
Version(s) affected
10.0.3
Description
Load OTPHP using autoload.php
configuration.php:
profile.manage.php:
class.user.php:
REESULT:
PHP Fatal error: Uncaught Error: Call to undefined method OTPHP\TOTP::generate() in class.user.php:582
How to reproduce
As above
Possible Solution
Make the autoloaded classes available inside the class function
I notice, if I output the autoload in configuration.php I get the AutoLoad\ClassLoader Object with the
OTPHP
package present. BUT, when I output the autoload inclass User
I get null/empty string...Additional Context
I know autoload is autoloading because I am using a number of other packages which are autoloaded.