PHP code example of thisanimus / craft-ccb-login

1. Go to this page and download the library: Download thisanimus/craft-ccb-login 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/ */

    

thisanimus / craft-ccb-login example snippets


$_SESSION = [
	'ccb_authenticated':true,
	'ccb_individual'=>[/* The whole CCB Individual Response */],
	'ccb_groups'=>[1,5,34,388]
];

$_SESSION = [
	'ccb_authenticated':false,
	'ccb_error'=>'Whatever error the CCB API throws'
];
twig
{{ dump(craft.ccblogin.userSession) }}