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.
User_access actually should have been marked as deprecated, when #1966334: Convert user_access to User::hasPermission() got in.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2045361-3.patch | 858 bytes | fubhy |
#1 | user_access-2045361-1.patch | 902 bytes | dawehner |
Comments
Comment #1
dawehnerComment #2
xjmShould have parens:
user_access()
. I'd also just say:Instead of user_access(), use:
Comment #3
fubhy CreditAttribution: fubhy commentedDon't we have *this* as a standard? At least I've seen that all across core in that way.
Comment #4
BerdirYes, I think that is correct. I doubt that the @code stuff would be parsed correctly.
Comment #5
alexpottCommitted b3149b2 and pushed to 8.x. Thanks!