Issues (103)

Examples/SetContactAuth.php (3 issues)

1
#!/usr/bin/php -f
2
<?php
3
/**
4
 * FlexiPeeHP - Example how to set up authentification
5
 *
6
 * @author     Vítězslav Dvořák <[email protected]>
7
 * @copyright  (G) 2017 Vitex Software
8
 */
9
10
namespace Example\FlexiPeeHP;
11
12
include_once './config.php';
13
include_once '../vendor/autoload.php';
14
15
$kontakter = new \FlexiPeeHP\Kontakt();
16
$first     = $kontakter->getColumnsFromFlexibee(['id'], ['limit' => 1]);
0 ignored issues
show
Deprecated Code introduced by
The function FlexiPeeHP\RO::getColumnsFromFlexiBee() has been deprecated: since version 2.0 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

16
$first     = /** @scrutinizer ignore-deprecated */ $kontakter->getColumnsFromFlexibee(['id'], ['limit' => 1]);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
17
$kontakter->setData([
18
    'id' => $first[0]['id'],
19
    'username' => 'login',
20
    'password' => 'heslo',
21
//    'password@hash' => 'sha256',
22
//    'password@salt' => 'osoleno',
23
    'email' => '[email protected]',
24
    'poznam' => 'auth']);
25
26
$kontakter->insertToFlexiBee();
0 ignored issues
show
Deprecated Code introduced by
The function FlexiPeeHP\RW::insertToFlexiBee() has been deprecated: since version 2.0 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

26
/** @scrutinizer ignore-deprecated */ $kontakter->insertToFlexiBee();

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
27
28
if ($kontakter->lastResponseCode == 201) {
29
    $kontakter->addStatusMessage('Password set', 'success');
30
    $kontakter->loadFromFlexiBee();
0 ignored issues
show
Deprecated Code introduced by
The function FlexiPeeHP\RO::loadFromFlexiBee() has been deprecated: since version 2.0 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

30
    /** @scrutinizer ignore-deprecated */ $kontakter->loadFromFlexiBee();

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
31
} else {
32
    $kontakter->addStatusMessage('Password set failed', 'warning');
33
}
34