'Create a new JIRA user.
:param username: the username of the new user
:type username: ``str``
:param email: email address of the new user
:type email: ``str``
:param directoryId: the directory ID the new user should be a part of
:type directoryId: ``int``
:param password: Optional, the password for the new user
:type password: ``str``
:param fullname: Optional, the full name of the new user
:type fullname: ``str``
:param notify: Whether or not to send a notification to the new user
:type notify: ``bool``
:param active: Whether or not to make the new user active upon creation
:type active: ``bool``'

def add_user(self, username, email, directoryId=1, password=None, fullname=None, notify=False, active=True, ignore_existing=False):

    if (not fullname):
        fullname = username
    url = (self._options[u'server'] + u'/rest/api/latest/user')
    x = OrderedDict()
    x[u'displayName'] = fullname
    x[u'emailAddress'] = email
    x[u'name'] = username
    if password:
        x[u'password'] = password
    if notify:
        x[u'notification'] = u'True'
    payload = json.dumps(x)
    try:
        self._session.post(url, data=payload)
    except JIRAError as e:
        err = e.response.json()[u'errors']
        if ((u'username' in err) and (err[u'username'] == u'A    user    with    that    username    already    exists.') and ignore_existing):
            return True
        raise e
    return True
