Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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);
Comment | File | Size | Author |
---|---|---|---|
#5 | wrong_comment_user-2595605-5-D8.patch | 691 bytes | snehi |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedI am tagging "Needs title update" because the title doesn't mention where in Drupal the documentation problem exists.
Comment #3
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedComment #4
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedComment #5
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedPlease review attached patch.
Comment #6
nicrodgersLooks good to me!
Comment #8
xjmI confirmed that there is nothing to do with
$form_state
anywhere 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!