def get_user_by_name(uname,**kwargs):
    """
        Get a user by username
    """
    try:
        user_i = db.DBSession.query(User).filter(User.username==uname).one()
        return user_i
    except NoResultFound:
        return None