Fabian Christen

Fabian Christen

С нами с 08 марта 2017; Место в рейтинге пользователей: #125
Fabian Christen
13 июня 2020, 12:51
+3
Thank you, Vasily.
Great article! The installation is a bit painful, but when it works, it is quite lightweight and easy to use.
Very useful that you describe the solutions for the installation problems.
Fabian Christen
13 июня 2019, 11:14
0
Thank you Vasily,

All 3 points are solved.
Point 3: I took the frontend javascript solution.

All the best
Fabian
Fabian Christen
22 января 2019, 11:06
+1
Thank you Vasily,
works like a charm.

best
Fabian
Fabian Christen
29 июня 2018, 16:24
0
Fast and precise as always!
Thank you very much.
Fabian Christen
20 июня 2018, 12:11
0
Works perfect!
Thank you very much!
Fabian Christen
13 июня 2018, 11:10
+1
Thank both of you.
Works perfect!

Fabian Christen
14 марта 2018, 22:04
+2
Thank you Василий Наумкин!

It worked with:
<?php

$groups = array(
    'extendedcompany' => 'Company'
);

if ($modx->context->key != 'mgr') {
    switch ($modx->event->name) {
        
        case 'OnBeforeUserFormSave':
            if (!empty($_POST['extendedcompany'])  || array_key_exists($_POST['extendedcompany'], $groups)) {
            // etwas dem profil hinzufügen    
            $fields['company'] = $_POST['extendedcompany'];
            $user->Profile->set('extended',$fields);
            break;
            }

    }
    
}