API page: http://api.drupal.org/api/drupal/modules%21user%21user.module/function/u...

Enter a descriptive title (above) relating to function user_login_finalize, then describe the problem you have found:

user_login_finalize() has an $edit parameter which has no documentation.

(Not tagging as Novice, as the callers to this function appear inconsistent. You have to go looking at http://api.drupal.org/api/drupal/modules!user!user.api.php/function/hook... to see what's expected.

Files: 
CommentFileSizeAuthor
#5 drupal-document_user_login_finalize-1966958-5.patch929 bytesmarkpavlitski
PASSED: [[SimpleTest]]: [MySQL] 55,712 pass(es).
[ View ]

Comments

Issue tags:+Novice

What is passed in is the $form_state array from the user login form, if the user login form was being used, but it's optional (several of the calling functions do not pass this parameter in, since they do not use the user login form).

I think that would be OK for a novice project to add this to the documentation. We should also add a note to the hook_user_login() docs to say that $edit could be an empty array if the user login form is not the mechanism being used to log in the user.

Issue tags:-Novice

> What is passed in is the $form_state array from the user login form, if the user login form was being used, but it's optional (several of the calling functions do not pass this parameter in, since they do not use the user login form).

Is that definitely correct?

The docs for hook_user_login() say:

> $edit: The array of form values submitted by the user.

Therefore, I was taking this to mean that there is a bug in two of the callers to this, which ought to pass their $form_state, but do not.

Issue tags:+Novice

Oops.

Bug filed for the missing param in the calls to this: #1967492: user_login_finalize() is called incorrectly.

Status:Active» Needs review
StatusFileSize
new929 bytes
PASSED: [[SimpleTest]]: [MySQL] 55,712 pass(es).
[ View ]

Patch for the documentation change.

Assigned:Unassigned» jhodgdon
Status:Needs review» Reviewed & tested by the community

Looks good, thanks! I'll get this committed soon.

Assigned:jhodgdon» Unassigned
Status:Reviewed & tested by the community» Fixed

Thanks again! Committed to 8.x and 7.x.

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