-
Notifications
You must be signed in to change notification settings - Fork 8
/
SetContactAuth.php
39 lines (31 loc) · 1005 Bytes
/
SetContactAuth.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/php -f
<?php
declare(strict_types=1);
/**
* This file is part of the EaseCore package.
*
* (c) Vítězslav Dvořák <http://vitexsoftware.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Example\AbraFlexi;
include_once './config.php';
include_once '../vendor/autoload.php';
$kontakter = new \AbraFlexi\Kontakt();
$first = $kontakter->getColumnsFromFlexibee(['id'], ['limit' => 1]);
$kontakter->setData([
'id' => $first[0]['id'],
'username' => 'login',
'password' => 'heslo',
// 'password@hash' => 'sha256',
// 'password@salt' => 'osoleno',
'email' => 'example@flexibee.eu',
'poznam' => 'auth']);
$kontakter->insertToFlexiBee();
if ($kontakter->lastResponseCode === 201) {
$kontakter->addStatusMessage('Password set', 'success');
$kontakter->loadFromAbraFlexi();
} else {
$kontakter->addStatusMessage('Password set failed', 'warning');
}