def getdisplayname(cursor, username):
	"""Retrieve public display name from username."""
	
	cursor.execute("select displayname from profile where username = ?;", (username,))
	
	displayname = cursor.fetchone()
	
	if displayname is None:
		return None
	
	return displayname[0]