'Update a user on PlexPy.
Required parameters:
user_id (str):              The id of the Plex user
Optional paramters:
friendly_name(str):         The friendly name of the user
custom_thumb (str):         The URL for the custom user thumbnail
do_notify (int):            0 or 1
do_notify_created (int):    0 or 1
keep_history (int):         0 or 1
Returns:
None'

@cherrypy.expose
@requireAuth(member_of('admin'))
@addtoapi()
def edit_user(self, user_id=None, **kwargs):

    friendly_name = kwargs.get('friendly_name', '')
    custom_thumb = kwargs.get('custom_thumb', '')
    do_notify = kwargs.get('do_notify', 0)
    keep_history = kwargs.get('keep_history', 0)
    allow_guest = kwargs.get('allow_guest', 0)
    if user_id:
        try:
            user_data = users.Users()
            user_data.set_config(user_id=user_id, friendly_name=friendly_name, custom_thumb=custom_thumb, do_notify=do_notify, keep_history=keep_history, allow_guest=allow_guest)
            status_message = 'Successfully    updated    user.'
            return status_message
        except:
            status_message = 'Failed    to    update    user.'
            return status_message
