login register token logic is ready. Fixed also some syntax bugs

This commit is contained in:
GitProtogen
2026-03-06 10:28:01 +01:00
parent 4b30283697
commit d51eedd7bd
5 changed files with 32 additions and 14 deletions
+8
View File
@@ -47,4 +47,12 @@ class TokenHandler
}
}
}
public static function deleteTokensForUser(string $user)
{
for ($i = 0; $i < count(self::$tokens); ++$i) {
if (self::$tokens[$i][0] === $user) {
array_splice(self::$tokens, $i, 1);
}
}
}
}