# Problem (\> 9.1) with User Permissions

**URL:** <https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151>\
**Category:** Site Feedback\
**Created:** [June 1, 2022, 5:47am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151 "2022-06-01T05:47:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PAlgoed](https://forums.concretecms.org/user_avatar/forums.concretecms.org/palgoed/32/3495_2.png) [@PAlgoed](https://forums.concretecms.org/u/PAlgoed)\
**Post date:** [June 1, 2022, 5:47am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/1 "2022-06-01T05:47:34Z")

</div>

Exception Occurred: …/concrete/src/Permission/Access/EditUserPropertiesUserAccess.php:79 Undefined array key “propertiesExcluded” (2)

when trying to add groups in ‘General User Permissions’

---

<div class="post-metadata">

**Author:** ![ConcreteOwl](https://forums.concretecms.org/user_avatar/forums.concretecms.org/concreteowl/32/6304_2.png) [@ConcreteOwl](https://forums.concretecms.org/u/ConcreteOwl)\
**Post date:** [June 1, 2022, 6:02am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/2 "2022-06-01T06:02:00Z")

</div>

I am unable to recreate this, which permission are you trying to add groups to and have you enabled advanced permissions?

---

<div class="post-metadata">

**Author:** ![PAlgoed](https://forums.concretecms.org/user_avatar/forums.concretecms.org/palgoed/32/3495_2.png) [@PAlgoed](https://forums.concretecms.org/u/PAlgoed)\
**Post date:** [June 1, 2022, 6:20am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/3 "2022-06-01T06:20:08Z")

</div>

yes, advanced permissions are enabled.  
i’m trying to add a group to ‘Edit User Details’ (Access, included). First ‘Save’ adds the group to the list, second ‘Save’ hangs with an infinite - nearly ‘finished’ - small blue progress bar at top of window. With the mentioned error in the Log

---

<div class="post-metadata">

**Author:** ![ConcreteOwl](https://forums.concretecms.org/user_avatar/forums.concretecms.org/concreteowl/32/6304_2.png) [@ConcreteOwl](https://forums.concretecms.org/u/ConcreteOwl)\
**Post date:** [June 1, 2022, 3:09pm UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/4 "2022-06-01T15:09:30Z")

</div>

I have just tried again by adding a ‘Members’ group to the ‘Edit User Details’ and ‘Access User Search’ with no problems at all.  
Maybe a server config problem?  
I have attached a screenshot of what I am seeing.

 ![screen](https://forums.concretecms.org/uploads/default/original/2X/0/070a3a16a445c16a24f3808872b6ad8a8554bfa0.jpeg)

---

<div class="post-metadata">

**Author:** ![PAlgoed](https://forums.concretecms.org/user_avatar/forums.concretecms.org/palgoed/32/3495_2.png) [@PAlgoed](https://forums.concretecms.org/u/PAlgoed)\
**Post date:** [June 2, 2022, 5:35am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/5 "2022-06-02T05:35:59Z")

</div>

Ok, I did some tests with different configs (same server, same server settings, except for the variations in PHP-version)…

With PHP 7.4.26: no problem at all (works with 9.0.2 and with 9.1.0 and with 9.1.1)

However when I switch the current PHP version to 8.0.13, one CANNOT add a user group (User Permissions). Stuck + error message in log (EditUserPropertiesUserAccess.php:79 Undefined array key “propertiesExcluded” (2)). Problem is there with 9.1.0 and 9.1.1

And - while inspecting the log - I encounter several error messages indicating problems with undefined variables. One example:

Exception Occurred: …/concrete/single\_pages/download\_file.php:23 Undefined variable $fID (2)

Undefined variables? Seems like the codebase of concrete9 has not been sorted out fully to comply to php8…

And - if you want I make another topic - there are other php8 related problems. A user who is member of the Administrators and who wants to view the members (Dashboard-\>Members-\>Search Users) doesn’t have any user listed. Simply switching back to PHP 7.4 ‘brings back’ all those members (unlisted in PHP8)

---

<div class="post-metadata">

**Author:** ![ConcreteOwl](https://forums.concretecms.org/user_avatar/forums.concretecms.org/concreteowl/32/6304_2.png) [@ConcreteOwl](https://forums.concretecms.org/u/ConcreteOwl)\
**Post date:** [June 2, 2022, 6:00am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/6 "2022-06-02T06:00:46Z")

</div>

You should report your findings as a ‘Bug’ so the core team are made aware. go to [Issues · concretecms/concretecms · GitHub](https://github.com/concretecms/concretecms/issues) to report it.

---

<div class="post-metadata">

**Author:** ![ConcreteOwl](https://forums.concretecms.org/user_avatar/forums.concretecms.org/concreteowl/32/6304_2.png) [@ConcreteOwl](https://forums.concretecms.org/u/ConcreteOwl)\
**Post date:** [June 2, 2022, 6:54am UTC](https://forums.concretecms.org/t/problem-9-1-with-user-permissions/3151/7 "2022-06-02T06:54:39Z")

</div>

As a temporary workaround I have wrapped each of the erroneous code blocks with an ‘isset’ condition.  
So the three code blocks now look like this (starting on line 79).

```auto
if (isset($args['propertiesExcluded'])) { // add this line
			if (is_array($args['propertiesExcluded'])) {
				foreach ($args['propertiesExcluded'] as $peID => $attributePermission) {
					$allowEditUNameExcluded = 0;
					$allowEditUEmailExcluded = 0;
					$allowEditUPasswordExcluded = 0;
					$allowEditUAvatarExcluded = 0;
					$allowEditUTimezoneExcluded = 0;
					$allowEditUDefaultLanguageExcluded = 0;
					$allowEditUHomeFileManagerFolderIDExcluded = 0;
					if (!empty($args['allowEditUNameExcluded'][$peID])) {
						$allowEditUNameExcluded = $args['allowEditUNameExcluded'][$peID];
					}
					if (!empty($args['allowEditUEmailExcluded'][$peID])) {
						$allowEditUEmailExcluded = $args['allowEditUEmailExcluded'][$peID];
					}
					if (!empty($args['allowEditUPasswordExcluded'][$peID])) {
						$allowEditUPasswordExcluded = $args['allowEditUPasswordExcluded'][$peID];
					}
					if (!empty($args['allowEditUAvatarExcluded'][$peID])) {
						$allowEditUAvatarExcluded = $args['allowEditUAvatarExcluded'][$peID];
					}
					if (!empty($args['allowEditUTimezoneExcluded'][$peID])) {
						$allowEditUTimezoneExcluded = $args['allowEditUTimezoneExcluded'][$peID];
					}
					if (!empty($args['allowEditUDefaultLanguageExcluded'][$peID])) {
						$allowEditUDefaultLanguageExcluded = $args['allowEditUDefaultLanguageExcluded'][$peID];
					}
					if (!empty($args['allowEditUHomeFileManagerFolderIDExcluded'][$peID])) {
						$allowEditUHomeFileManagerFolderIDExcluded = $args['allowEditUHomeFileManagerFolderIDExcluded'][$peID];
					}
					$v = [$this->getPermissionAccessID(), $peID, $attributePermission, $allowEditUNameExcluded, $allowEditUEmailExcluded, $allowEditUPasswordExcluded, $allowEditUAvatarExcluded, $allowEditUTimezoneExcluded, $allowEditUDefaultLanguageExcluded, $allowEditUHomeFileManagerFolderIDExcluded];
					$db->executeQuery('insert into UserPermissionEditPropertyAccessList (paID, peID, attributePermission, uName, uEmail, uPassword, uAvatar, uTimezone, uDefaultLanguage, uHomeFileManagerFolderID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', $v);
				}
			}
        } // add this line

        if (isset($args['akIDInclude'])) { // add this line
			if (is_array($args['akIDInclude'])) {
				foreach ($args['akIDInclude'] as $peID => $akIDs) {
					foreach ($akIDs as $akID) {
						$v = [$this->getPermissionAccessID(), $peID, $akID];
						$db->executeQuery('insert into UserPermissionEditPropertyAttributeAccessListCustom (paID, peID, akID) values (?, ?, ?)', $v);
					}
				}
			}
		} // add this line

		if (isset($args['akIDExclude'])) { // add this line
			if (is_array($args['akIDExclude'])) {
				foreach ($args['akIDExclude'] as $peID => $akIDs) {
					foreach ($akIDs as $akID) {
						$v = [$this->getPermissionAccessID(), $peID, $akID];
						$db->executeQuery('insert into UserPermissionEditPropertyAttributeAccessListCustom (paID, peID, akID) values (?, ?, ?)', $v);
					}
				}
			}
        } // add this line
```
