Jump to content
Froxlor Forum
  • 0

API / Customer.update / allowed_phpconfigs


rickstinson

Question

Hallo,

eine kurze Frage zur API (2.0.19). Ich würde gerne die erlaubten PHP Konfigurationen setzen.

Beim Abruf erhalte ich zB folgenden Wert:

    ["allowed_phpconfigs"]=>
    string(5) "[2,3]"

 

wenn ich aber da etwas setzen möchte (zB ID 3,4) bekomme ich als Antwort immer nur "NULL".

Beispiel wie ich ein Update mache (die PHP IDs gibt es natürlich)

$data = [
        'id' => '16',
        'email_imap' => '1',
        'email_pop3' => '1',
        'phpenabled' => '1',
        'allowed_phpconfigs' => '[3,4]'
];
$response = $fapi->request('Customers.update', $data);

 

Vielen Dank!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
	 * @param array $allowed_phpconfigs
	 *                             optional, array of IDs of php-config that the customer is allowed to use, default
	 *                             empty (none)

du übergibst schon den JSON string, einfach direkt als PHP array übergeben:
 

$data = [
        'id' => '16',
        'email_imap' => '1',
        'email_pop3' => '1',
        'phpenabled' => '1',
        'allowed_phpconfigs' => [3,4]
];
$response = $fapi->request('Customers.update', $data);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...