Check if user account with uid 1 exists on hook_install()

Created on 1 February 2024, 12 months ago
Updated 5 April 2024, 10 months ago

Problem/Motivation

In hook_install user with uid=1 is loaded. It's assumed, that it exists. Make sure, that it's true before you'll try to set impersonate account.

Steps to reproduce

Try to install module on page where there is no user with uid = 1 (e.g. in our case it's database used for tests).

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇵🇱Poland gugalamaciek

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

Comments & Activities

Production build 0.71.5 2024