def whoami(bot, update):
    """Prints user information.

    Prints the information of the Telegram user that called the
    command so that they can be autorized to modify the bot.
    Additionally directions to authorize the user is also printed.

    Syntax: /whoami

    Returns:
        Failure: -1
        Success: 0
    """
    #Initialize function
    if update.message.from_user.username == '':
        username = '<not registered>'
    else:
        username = update.message.from_user.username
    userid = update.message.from_user.id

    #Build the message to print
    message = 'You are %s (id: %i)\n\n' % (username,
                                           userid)                    + \
              'You can be authorized with the following command:\n\n' + \
              '/authorize %i %s' % (userid, username)

    #Print the messsage
    bot.sendMessage(chat_id = update.message.chat_id,
                    text = message)

    #Exit the function
    return 0
