Loginprotect
class Loginprotect
Methods
__construct(mysqli $db)
No description
static string
getClientIp()
No description
array
isBlocked(int|null $userId = null, string|null $ip = null)
No description
array
registerFailure(int|null $userId = null, string|null $ip = null)
No description
void
resetAttempts(int|null $userId = null, string|null $ip = null)
No description
void
unblockUserAllIps(int $userId)
Unblock a user across all IPs (admin action).
void
unblockByIp(string $ip)
Unblock by IP only (clears both user-bound and anonymous attempts for this IP).
isPasswordPwned($password)
No description
Details
at line 10
__construct(mysqli $db)
No description
at line 15
static string
getClientIp()
No description
at line 29
array
isBlocked(int|null $userId = null, string|null $ip = null)
No description
at line 53
array
registerFailure(int|null $userId = null, string|null $ip = null)
No description
at line 88
void
resetAttempts(int|null $userId = null, string|null $ip = null)
No description
at line 109
void
unblockUserAllIps(int $userId)
Unblock a user across all IPs (admin action).
Deletes all records for the given userId, regardless of IP.
at line 119
void
unblockByIp(string $ip)
Unblock by IP only (clears both user-bound and anonymous attempts for this IP).
at line 141
isPasswordPwned($password)
No description