Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 uid=1(daemon) gid=1(daemon) grupos=1(daemon) Safe-mode: OFF (not secure) /opt/apex_tdfonline/php/3ros/simplesamlphp/modules/core/docs/ drwxr-xr-x | |
| Viewing file: Select action/file-type: `core:PHP`
==========
This is a filter which makes it possible to run arbitrary PHP code to modify the attributes of an user.
Parameters
----------
`class`
: This is the name of the filter.
It must be `'core:PHP'`.
`code`
: The PHP code that should be run.
This PHP code will have one variable available - `$attributes`.
This is an associative array of attributes, and can be modified to add or remove attributes.
Examples
--------
Add the `mail` attribute based on the user's `uid` attribute:
10 => array(
'class' => 'core:PHP',
'code' => '
if (empty($attributes["uid"])) {
throw new Exception("Missing uid attribute.");
}
$uid = $attributes["uid"][0];
$mail = $uid . "@example.net";
$attributes["mail"] = array($mail);
',
),
Create a random number variable:
10 => array(
'class' => 'core:PHP',
'code' => '
$attributes["random"] = array(
(string)rand(),
);
',
),
|
:: Command execute :: | |
--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5129 ]-- |