Round Rock / Austin, Texas
Drupal Web Developer

How to Display the User Login or Register form in PHP in D7

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).

How to Display the User Login or Register form in PHP in D7

Display User Login in PHP for Drupal 7

Need to display the user login or registration form within your php code?  Here's how!

Login:
<?php print drupal_render(drupal_get_form('user_login'));?>

Register:
<?php print drupal_render(drupal_get_form('user_register_form'));?>