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?


1 Answer 1


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.

  • Yes, I've just found before a minute that function. :) thanks. Jan 24, 2014 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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