Why doesn't AccountInterface yield a isEnabled() method?

Created on 22 August 2018, over 6 years ago
Updated 30 January 2024, about 1 year ago

AccountInterface in Drupal doesn't yield an isEnabled() or an isBlocked() method, why is that ?

Access checkers code could use this information to determine access to some resources, for example, in Symfony, the AdvancedUserInterface interface brings along multiple methods such as isAccountNonExpired(), isAccountNonLocked(), isCredentialsNonExpired() and isEnabled().

I'm not saying all those methods would be useful altogether, but an isEnabled() method would be nice to have at the interface level, an AuthenticationProviderInterface implementation that does not uses core entity could want to propagate this information as well.

Moreover, under certain scenarios, it's an information that may be required for some business code in order to proceed to access checks. And since the authentication provider can return a non-core-entity user, it might be nice to have it directly on the top level interface.

Feature request
Status

Active

Version

11.0 🔥

Component
User system 

Last updated 1 day ago

Created by

🇫🇷France pounard

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024