PHP code example of activecollab / user

1. Go to this page and download the library: Download activecollab/user library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

activecollab / user example snippets


$user = new ActiveCollab\User\IdentifiedVisitor('Ilija Studen', '[email protected]');

print $user->getFirstName() . "\n";
print $user->getLastName() . "\n";
print $user->formatName(ActiveCollab\User\UserInterface::NAME_INITIALS) . "\n";

$user = new ActiveCollab\User\IdentifiedVisitor('Ilija Studen', '[email protected]');
print_r(json_decode(json_encode($user), true));

$user1 = new ActiveCollab\User\IdentifiedVisitor('John Doe', '[email protected]');
$user2 = new ActiveCollab\User\IdentifiedVisitor('Jane Doe', '[email protected]');

if ($user1->is($user2)) {
    print "Same person\n";
} else {
    print "Not the same person\n";
}