Vasily Posted July 4, 2019 Share Posted July 4, 2019 Hello, I would like to figure out how to validate the server credentials for my provisioning module during adding/editing a server and prevent the operation and show an error if something is wrong. Please advise how to do it. Can I use hooks ServerAdd, ServerEdit, ServerDelete for it? if yes, what should I return in the hook callback? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted July 8, 2019 Share Posted July 8, 2019 Those would be the correct hooks, but they don't support any returns and thus wont help here. What you could do is use those hooks and redirect back to the server page when your tests fail and set a session variable of "server_error". Then use an AdminAreaHeaderOutput hook and check for that session variable and display error. 1 Quote Link to comment Share on other sites More sharing options...
Vasily Posted July 11, 2019 Author Share Posted July 11, 2019 steven99 , It seems a good workaround and works for me Thank you for the advice! 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.