hey Ipstenu, thanks for the quick reply. However, I prefer not to use the plugin, as it is an overkill for what I think should be quite a simple functionality…
I wrapped it in is_user_logged_in(), but it still gets to an infinite loop in the login page (since there user is not yet logged in…)
For the moment I used $_SERVER[“PHP_SELF”] to check if I’m in the “wp-login.php” page, but it’s an ugly solution ??