Using Bright Before It Has Initialized

Normally, Bright is automatically initialized as part of wp_head hook.

If you need to use it before this hook in the WordPress render sequence, you initialize it by hand

    $bright = \Bright\Wordpress::getInstance();
    $user = wp_get_current_user();
    $bright->setCurrentUser($user);
    $bright->getAuthenticationCodeForUser($user);