API page: https://api.drupal.org/api/drupal/core%21modules%21user%21user.module/fu...
The code contains the following lines.
// Remove password and session IDs, $form_state, since themes should not need nor see them.
unset($variables['user']->pass, $variables['user']->sid, $variables['user']->ssid);
The comment is wrong, since the code is not unsetting any $form_state. It is just unsetting password and session IDs.
// Remove password and session IDs, since themes should not need nor see them.
unset($variables['user']->pass, $variables['user']->sid, $variables['user']->ssid);
Comments
Comment #2
cilefen commentedI am tagging "Needs title update" because the title doesn't mention where in Drupal the documentation problem exists.
Comment #3
snehi commentedComment #4
snehi commentedComment #5
snehi commentedPlease review attached patch.
Comment #6
nicrodgersLooks good to me!
Comment #8
xjmI confirmed that there is nothing to do with
$form_stateanywhere in this alter hook implementation. :) At most it's related because it's preproccessing a form... I guess. But the previous docs were confusing, ungrammatical, and too long per our coding standards.As a documentation-only fix, this change is considered "rc eligible" and can be committed any time during RC. Reference: https://www.drupal.org/core/d8-allowed-changes#rc Committed and pushed to 8.0.x. Thanks!