Long ago I built a php based application for room reservations which basically ran on its own – outside the website's CMS. It was part of what I would now call a custom made intranet – or "custom-app".

Now the main website finally runs on drupal – but now we have the drupal login and the custom-app login. How could I now 'teach' the custom-app to accept visitors that are already logged in to the dp based CMS?

I know, the 'easiest' or actually 'most correct' way of doing this would probably be to develop the custom-app into a module. But are there other ways e.g. to pass the login information over to the custom-app? Any pointers would help. Thank you!

update1: both are running on the same server under the same domain.

update2: I finally came across this question "How to call drupal_bootstrap from custom file in subfolder?" – I guess going bootstrap would be the right direction for now…

  • Are the custom-app and main site on the same domain? Commented Feb 23, 2016 at 16:21
  • Yes they are. (Updated the question – thank you for asking!) Commented Feb 23, 2016 at 22:00

1 Answer 1


You can install in your drupal site a contrib module which allow you to create an API which can access another modules.

You can use Services module which implements route to allow users login across external sites, and another route to get the current user logged in.

So you can install this module and enable this routes, and with your php site make http calls to this sites to log in the user and check if he is logged in.

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.