def update_user(p_dict, username):
    """Updates user by username"""
    updated_param = {'username': p_dict['username'] if 'username' in p_dict
         else username, 'display_name': p_dict['display_name'] if 
        'display_name' in p_dict else 'Mr. Example', 'email': p_dict[
        'email'] if 'email' in p_dict else 'examplej@example.com', 'active':
        True, 'site_admin': False if 'site_admin' not in p_dict else p_dict
        ['site_admin'], 'site_manager': False if 'site_manager' not in
        p_dict else p_dict['site_manager'], 'site_spectator': False if 
        'site_spectator' not in p_dict else p_dict['site_spectator'],
        'created_at': '2015-02-29', 'deleted_at': None}
    return updated_param
