Return the specified entry from user's crontab.
    identifier will be used if specified, otherwise will lookup cmd
    Either identifier or cmd should be specified.

    user:
        User's crontab to query

    identifier:
        Search for line with identifier

    cmd:
        Search for cron line with cmd

    CLI Example:

    .. code-block:: bash

        salt '*' cron.identifier_exists root identifier=task1

def get_entry(user, identifier=None, cmd=None):
    '''
    Return the specified entry from user's crontab.
    identifier will be used if specified, otherwise will lookup cmd
    Either identifier or cmd should be specified.

    user:
        User's crontab to query

    identifier:
        Search for line with identifier

    cmd:
        Search for cron line with cmd

    CLI Example:

    .. code-block:: bash

        salt '*' cron.identifier_exists root identifier=task1
    '''
    cron_entries = list_tab(user).get('crons', False)
    for cron_entry in cron_entries:
        if identifier and cron_entry.get('identifier') == identifier:
            return cron_entry
        elif cmd and cron_entry.get('cmd') == cmd:
            return cron_entry
    return False