I have a register form that I am able to submit programmatically without any problems.
However when I try to do the same with the user reset password form, it doesn't send me any emails, nor does it do any validation.
Here's the code I'm using:
$form_state = array(); $form_state['values']['name'] = $_POST['username']; $form_state['values']['submit'] = t('E-mail me new password'); drupal_form_submit('user_pass_form', $form_state);
Note: I've tried using
user_pass instead of
What am I doing wrong?