src/Utility/ICal/IcEmail.php
protected function getUserString() : string
    {
        $result = 'System';

        $userFields = [
            'name',
            'username',
            'email',
        ];

        $currentUser = User::getCurrentUser();
        if (empty($currentUser) || !is_array($currentUser)) {
            return $result;
        }

        foreach ($userFields as $field) {
            if (!empty($currentUser[$field])) {
                return $currentUser[$field];
            }
        }

        return $result;
    }
protected function getUserString() : string
    {
        $result = 'System';

        $userFields = [
            'name',
            'username',
            'email',
        ];

        $currentUser = User::getCurrentUser();
        if (empty($currentUser) || !is_array($currentUser)) {
            return $result;
        }

        foreach ($userFields as $field) {
            if (!empty($currentUser[$field])) {
                return $currentUser[$field];
            }
        }

        return $result;
    }
protected function getUserString ( ) : string { $ result = 'System' ; $ userFields = [ 'name' , 'username' , 'email' , ] ; $ currentUser = User :: getCurrentUser ( ) ; if ( empty ( $ currentUser ) || ! is_array ( $ currentUser ) ) { return $ result ; } foreach ( $ userFields as $ field ) { if ( ! empty ( $ currentUser [ $ field ] ) ) { return $ currentUser [ $ field ] ; } } return $ result ; }
Get plain value of the current user

@return string
Get plain value of the current user