Zum Inhalt springen

Login-Form invisible when IP-rage is wrong//No login-process possible from wrong IP

Erstellt am 11. Februar 2017 · 1 Antwort · letzte Antwort am 21. Februar 2017

Tags: felogin, TYPO3 7, Frage, English

hansiglue ·

I work with typo3 7.6 LTS and some extensions do not work any more. On some pages I have a FE-Login-Form to login to some pages to be seen after fe-login.

Now, I would like to restrict the login process to a certain IP-range from which it is initiated. The deprecated extension helped to realize this by not displaying the login-content-element in the frontend when the page had been called from the wrong ip-range. Being called from the right IP-range the login-form will be displayed and the login-process maybe initiated.

After some hours looking and trying nonsense I got a shabby solution. I add a template expansion on the page where the login-form should be displayed/not-displayed. And this code:

[IP = *.*.*.*]
plugin.tx_felogin_pi1._CSS_DEFAULT_STYLE (
    .tx-felogin-pi1  form, input {
        display: none;
    }
)
[end]

[IP = x.y.*.*]
plugin.tx_felogin_pi1._CSS_DEFAULT_STYLE (
    .tx-felogin-pi1  form, input {
        display: block;
    }
)
[end]

This works for the html-code of the form-tag. It is simply turned off by css. Shabby!

Does anybody have an idea more elegant?