[TikiWiki-commits] [Git][tikiwiki/tiki][24.x] [FIX] 2fa imports issue
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]> Mon, 06 Jul 2026 16:37:22 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a4bd9c2655c_3819aa0067119@gitlab-sidekiq-low-urgency-cpu-bound-v2-868885d4b5-th2mj.mail> |
Victor Emanouilov pushed to branch 24.x at Tiki Wiki CMS Groupware / Tiki
Commits:
97219c19 by Elifeleti Mukisa Dan at 2026-07-06T16:31:22+00:00
[FIX] 2fa imports issue
---
* [FIX] 2fa issue
See merge request tikiwiki/tiki!10658
- - - - -
3 changed files:
- lib/core/Feedback.php
- lib/userslib.php
- tiki-login.php
Changes:
=====================================
lib/core/Feedback.php
=====================================
@@ -67,6 +67,24 @@ class Feedback
die;
}
+ /**
+ * Redirect to a page with error feedback and Die
+ *
+ * @param string $message
+ * @param int $httpCode
+ *
+ * @throws Exception
+ */
+ public static function errorAndDie($message, $httpCode)
+ {
+ $smarty = TikiLib::lib('smarty');
+ $smarty->assign('errortype', $httpCode);
+ $smarty->assign('msg', $message);
+ http_response_code($httpCode);
+ $smarty->display("error.tpl");
+ die;
+ }
+
/**
* Add note feedback
*
=====================================
lib/userslib.php
=====================================
@@ -7428,6 +7428,12 @@ class UsersLib extends TikiLib
return $this->getOne($query, [$user]);
}
+ public function updateLastMFADate($username)
+ {
+ $query = "update `users_users` set `last_mfa_date` = ? WHERE `login` = ?";
+ $this->query($query, [time(), $username]);
+ }
+
public function validate_two_factor($twoFactorSecret, $pin, $user)
{
$google2fa = new Google2FA();
=====================================
tiki-login.php
=====================================
@@ -9,6 +9,8 @@
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
+use Tiki\TwoFactorAuth\TwoFactorAuth;
+use Tiki\TwoFactorAuth\Exception\TwoFactorAuthException;
$inputConfiguration = [
[ 'staticKeyFilters' => [
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/97219c19828273a5573dd010b68365fb51b06f9c
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/97219c19828273a5573dd010b68365fb51b06f9c
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs