[Frage] Login-Form invisible when IP-rage is wrong//No login-process possible from wrong IP TYPO3-Version: 7.6.15

  • hansiglue hansiglue
    Jar Jar Binks
    0 x
    1 Beiträge
    0 Hilfreiche Beiträge
    11. 02. 2017, 15:42

    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:

    [TS][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][/TS]

    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?

    Tags: Felogin
  • Hilfreichster Beitrag

  • Julian.Hofmann Julian.Ho...
    Flash Gordon
    1 x
    3116 Beiträge
    137 Hilfreiche Beiträge
    21. 02. 2017, 11:09 - Hilfreichster Beitrag

    Have you tried using the if-function together with gettext?
    https://docs.typo3.org/typo3cms/TyposcriptReference/DataTypes/Gettext/Index.html?highlight=gettext#getindpenv

    Not tested:

    1. page.123 = COA
    2. page.123 {
    3. if.value = 192.168.1.1
    4. if.equals.data = getIndpEnv : REMOTE_ADDR
    5. 10 < plugin.tx_felogin
    6. }


  • 1
  • 1