Horde_Registry::convertUsername PHP Method

convertUsername() public method

Converts an authentication username to a unique Horde username.
public convertUsername ( string $userId, boolean $toHorde ) : string
$userId string The username to convert.
$toHorde boolean If true, convert to a Horde username. If false, convert to the auth username.
return string The converted username.
    public function convertUsername($userId, $toHorde)
    {
        try {
            return $GLOBALS['injector']->getInstance('Horde_Core_Hooks')->callHook('authusername', 'horde', array($userId, $toHorde));
        } catch (Horde_Exception_HookNotSet $e) {
            return $userId;
        }
    }