Source
$userdirectory_mediaids = array_column($userdirectory['provision_media'], 'userdirectory_mediaid', 'mediatypeid');
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
require_once dirname(__FILE__) . '/common/CAPIScimTest.php';
/**
* @onBefore prepareUserData
*
* @onAfter clearData
*/
class testScimUser extends CAPIScimTest {
private static $data = [
'userdirectoryid' => [
'ldap' => null,
'saml' => null
],
'userid' => [
'ldap_user' => null,
'saml_user_active' => null,
'saml_user_inactive' => null,
'saml_user_only_username' => null,
'saml_user_with_media' => null,
'admin' => null,
'user' => null,
'guest_user' => null
],
'username' => [
'ldap_user' => 'dwight.schrute@office.com',
'saml_user_active' => 'jim.halpert@office.com',
'saml_user_inactive' => 'pam.beesly@office.com',
'saml_user_only_username' => 'andy.bernard@office.com',
'saml_user_with_media' => 'bob.schrute@office.com'
],
'tokenids' => [
'superadmin' => null,
'admin' => null,
'user' => null,
'guest_user' => null
],
'tokens' => [
'admin' => null,
'user' => null,
'guest_user' => null,
'no_token' => null
],
'mediatypeid' => [
'SMS' => '3',
'Email' => '1'
],