public static function checkUserHasSuperUserAccessOrIsTheUser($theUser)
    {
        try {
            if (Piwik::getCurrentUserLogin() !== $theUser) {
                // or to the Super User
                Piwik::checkUserHasSuperUserAccess();
            }
        } catch (NoAccessException $e) {
            throw new NoAccessException(Piwik::translate('General_ExceptionCheckUserHasSuperUserAccessOrIsTheUser', array($theUser)));
        }
    }
public static function checkUserHasSuperUserAccessOrIsTheUser($theUser)
    {
        try {
            if (Piwik::getCurrentUserLogin() !== $theUser) {
                // or to the Super User
                Piwik::checkUserHasSuperUserAccess();
            }
        } catch (NoAccessException $e) {
            throw new NoAccessException(Piwik::translate('General_ExceptionCheckUserHasSuperUserAccessOrIsTheUser', array($theUser)));
        }
    }
public static function checkUserHasSuperUserAccessOrIsTheUser ( $ theUser ) { try { if ( Piwik :: getCurrentUserLogin ( ) !== $ theUser ) { // or to the Super User Piwik :: checkUserHasSuperUserAccess ( ) ; } } catch ( NoAccessException $ e ) { throw new NoAccessException ( Piwik :: translate ( 'General_ExceptionCheckUserHasSuperUserAccessOrIsTheUser' , array ( $ theUser ) ) ) ; } }
Check that the current user is either the specified user or the superuser.

@param string $theUser A username.
@throws NoAccessException If the user is neither the Super User nor the user `$theUser`.
@api
Check that the current user is either the specified user or the superuser .