Closed Neriderc closed 8 months ago
Quick update: I edited the file "src/Modules/SimpleAutoLoginPage.php" and changed "Fisharebest\Webtrees\Carbon" to "Carbon/Carbon" after seeing this is how it's now used in the webtrees code. I have no idea what it was supposed to do, but I no longer get the error, and the login seems to work :)
I found I was running into this error as well running webtrees 2.1.7. However, I did not have any luck with the change that worked for @Neriderc.
Instead I looked for and found the same command in LoginAction.php. It just uses time(); so I made the following change
Auth::user()->setPreference(UserInterface::PREF_TIMESTAMP_ACTIVE, (string) Carbon::now()->unix());
to
Auth::user()->setPreference(UserInterface::PREF_TIMESTAMP_ACTIVE, (string) time());
This cleared the error for me. I'm not sure if it's the right or best solution, but I figured can't hurt to do it as it is done elsewhere in the app.
Thanks, now corrected in 0.0.5
I'm trying to set this up with webtrees and have come across this error when logging in: Class 'Fisharebest\Webtrees\Carbon' not found …/modules_v4/webtrees_simpleautologin/src/Modules/SimpleAutoLoginPage.php:79
I'm using webtrees 2.1.2 and I know there have been some changes so it might not support the recent versions. Any chance of an update?