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.
Let's start to convert all calls to user_access() with the new AccountInterface::hasPermission() method.
Part of #2048171: [meta] Replace user_access() calls with $account->hasPermission() wherever possible.
Change records for this issue:
Comment | File | Size | Author |
---|---|---|---|
#6 | 2062031-replace-user_access-calls-6.patch | 684 bytes | rhm5000 |
#6 | interdiff-2062031-1-6.txt | 832 bytes | rhm5000 |
#1 | drupal-tour_replace_user_access-2062031.patch | 782 bytes | InternetDevels |
Comments
Comment #1
InternetDevels CreditAttribution: InternetDevels commentedHere is the patch.
Comment #3
larowlan#1: drupal-tour_replace_user_access-2062031.patch queued for re-testing.
Comment #5
andypostUse Drupal::currentUser() service https://drupal.org/node/2032447
Comment #6
rhm5000 CreditAttribution: rhm5000 commentedComment #7
andypostNice!
Comment #8
webchickCommitted and pushed to 8.x. Thanks!