'Return autocomplete data for user emails'

@web.expose
@web.require_admin
def name_autocomplete_data(self, trans, q=None, limit=None, timestamp=None):

    ac_data = ''
    for user in trans.sa_session.query(trans.app.model.User).filter_by(deleted=False).filter(func.lower(trans.app.model.User.email).like((q.lower() + '%'))):
        ac_data = ((ac_data + user.email) + '\n')
    return ac_data
