Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to add the login form to a custom page I've created using a custom module, but I dont know how?
Shouldn't there be a form to use like get_drupal_form?
Using Drupal 7.
Drupal comes with a login block you can put in any of your theme regions to have show up on that page.
Or you can use drupal_get_form('user_login') if you want it to show up in your content somewhere.
I figured it out. I used:
$html = drupal_render(drupal_get_form('user_login'))
Required, but never shown