diff --git a/html_api/settings/index.php b/html_api/settings/index.php
index e0f5bf2..9546d2e 100644
--- a/html_api/settings/index.php
+++ b/html_api/settings/index.php
@@ -26,6 +26,9 @@ $joinpref = $userquery->canJoin;
$tradepref = null;
$theme = $userquery->theme;
+//initialize 2FA in the database if it hasnt been already
+initialize2FA($userid);
+
$userInfo = array (
"userid" => $userid,
"username" => $username,