def add_user(self, username, password, full_name=None, trusted=False, readonly=False):
<EOL>char_set = string.ascii_letters + string.digits<EOL>salt = '<STR_LIT>'.join(random.choice(char_set) for x in range(<NUM_LIT:8>))<EOL>sql = '''<STR_LIT>'''<EOL>try:<EOL><INDENT>self._db_curs.execute(sql, (username, salt,<EOL>self._gen_hash(password, salt), full_name, trusted or False,<EOL>readonly or False))<EOL>self._db_conn.commit()<EOL><DEDENT>except (sqlite3.OperationalError, sqlite3.IntegrityError) as error:<EOL><INDENT>raise AuthError(error)<EOL><DEDENT>
Add user to SQLite database.

            * `username` [string]
                Username of new user.
            * `password` [string]
                Password of new user.
            * `full_name` [string]
                Full name of new user.
            * `trusted` [boolean]
                Whether the new user should be trusted or not.
            * `readonly` [boolean]
                Whether the new user can only read or not