Skip to content
Snippets Groups Projects
Commit 1db149b7 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #46126 by killes: properly initialize the user roles array.

parent eb2bed28
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -67,6 +67,7 @@ function user_load($array = array()) {
$user = db_fetch_object($result);
$user = drupal_unpack($user);
$user->roles = array();
if ($user->uid) {
$user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';
}
......
......@@ -67,6 +67,7 @@ function user_load($array = array()) {
$user = db_fetch_object($result);
$user = drupal_unpack($user);
$user->roles = array();
if ($user->uid) {
$user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment