PHP code example of mati-core / user

1. Go to this page and download the library: Download mati-core/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/ */

    

mati-core / user example snippets


/**
 * @var string
 */
protected $pageRight = 'cms';

use UserPresenterAccessTrait;

public function checkAccess(string $rightSlug): bool

$this->checkAccess('right-slug');

$presenter->checkAccess('right->slug');

function (string $login, string $password): array
bash
php www/index.php app:user:init <username> <password> 
bash
php www/index.php app:usergroup:create <groupname>
bash
php www/index.php app:user:create <username> <password>