PHP code example of aclavijo / cakeopenidconnect

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

    

aclavijo / cakeopenidconnect example snippets


    function getUserByPseudo($pseudo)
    {
        $params = array(
            'conditions' => array('Utilisateur.pseudo' => $pseudo)
        );
        $result = $this->find('first', $params);
        
        return $result['Utilisateur'];
    }

Router::connect('/openid/oauth/authentification', array('plugin' => 'openid', 'controller' => 'oauth', 'action' => 'authentification'));

 echo $html->link('Name your button', array(
        'plugin' => 'openid', 
        'controller' => 'oauth',
        'action' => 'authentification' 
    ), array(
        'class' => 'btn btn-primary'
    ));