Remitur Posted August 18, 2022 Share Posted August 18, 2022 How can I retrieve the IP of the user inside a hook? I.e.: in ClientAreaPagePasswordReset ( https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareapagepasswordreset ) I would like to retrieve the IP of the user that is going to ask for a password reset... how is it possible? 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted August 20, 2022 Author Share Posted August 20, 2022 (edited) Here I'm, going to answer on my own: the user IP can be retrieved in any hook so: $ userip = $ _ SERVER [ ' REMOTE_ADDR ' ] ; (note: random spaces added to code just to walkaround the error given by this community when you try to post PHP code...) Edited August 20, 2022 by Remitur 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.