Hello,

I was trying to do a very simple thing which turned out to be a major obstacle...

All I am after is presenting the 'request new password' form within it's own block. For that end I placed the following code within a new block:

print drupal_get_form('user_pass');

user_pass is supposed to be the form_id of the desired form.

On D5 I see it is working but no matter what I did on D6 I get the message:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'user_pass' was given in D:\MyDocuments\70_MyWebSites\drupal_sandbox_6\includes\form.inc on line 366.

When trying to print the forms 'user_login' or 'user_register' there was no problem.

What am I doing wrong?

Thanks!

Comments

shxcraw’s picture

Hello, you should include user.pages.inc module, i had the same situation and it helped.

   module_load_include('inc', 'user', 'user.pages');
   print drupal_get_form('user_pass');
udig’s picture

shxcraw, thanks a lot.

bartclarkson’s picture

this helped me too.

john.arroyo’s picture

This saved me some migration time, thanks

dave reid’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

interfaced’s picture

Amazing! Thanks for this fix!

Mr.vantri’s picture

Thanks you!

alexmoreno’s picture

#1 worked perfectly, thank a lot :-)

mahdisfax’s picture

thanks it's help me.

gskharmujai’s picture

Been struggling with this issue for almost 24hrs. now i got it. Thank you!