Replace user_is_blocked() with isBlocked() in AuthDecorator

Created on 30 March 2023, about 1 year ago
Updated 9 May 2023, about 1 year ago

Problem/Motivation

In AuthDecorator we check if the user is blocked, by using the user.module user_is_blocked() method. We can replace it with ->isBlocked() since we are already loading the whole User object.

This is a performance improvement, since user_is_blocked() queries the database and we can get rid of that call by simply using the methods available in the User entity.

Steps to reproduce

Check AuthDecorator, line 79

Proposed resolution

Replace user_is_blocked with isBlocked() method.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇸🇮Slovenia nkoporec Slovenia

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

Comments & Activities

Production build 0.69.0 2024