PHP code example of brianrlewis / magic-admin

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

    

brianrlewis / magic-admin example snippets


$magic->users->logoutByIssuer('<issuer>');

$magic->users->logoutByPublicAddress('<publicAddress>');

$magic->users->logoutByToken('<DIDToken>');

$metadata = $magic->users->getMetadataByIssuer('<issuer>');

$metadata = $magic->users->getMetadataByPublicAddress('<publicAddress>');

$metadata = $magic->users->getMetadataByToken('<DIDToken>');

echo $metadata->email;
echo $metadata->publicAddress;
echo $metadata->issuer;