Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Apr 2013 at 18:47 UTC
Updated:
29 Jul 2014 at 22:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonWhat 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.
Comment #2
joachim commented> 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.
Comment #3
joachim commentedOops.
Comment #4
joachim commentedBug filed for the missing param in the calls to this: #1967492: user_login_finalize() is called incorrectly.
Comment #5
markpavlitski commentedPatch for the documentation change.
Comment #6
jhodgdonLooks good, thanks! I'll get this committed soon.
Comment #7
jhodgdonThanks again! Committed to 8.x and 7.x.