I have successful connected website with a web service SOAP. The SOAP PHP library is working great. So far I've used a forms that corresponds with the web service, but now I want to invoke a specific method of the web service by clicking on some link. For an example, the web service has a method "Logout" and I want to pass the xml string after clicking on user/logout. How can I do that?


You can implement hook_user_logout():

function MYMODULE_user_logout($account) {
  // Make your web service call here.

That hook will be invoked whenever a user logs out, which includes them clicking on any link to user/logout.

| improve this answer | |
  • Yes, I've just found before a minute that function. :) thanks. – user2519032 Jan 24 '14 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.