def _add_account_subscription(self, uid): """ """ site = self.getSite() meeting = self.getMeeting() name = getUserFullName(site, uid) email = getUserEmail(site, uid) organization = getUserOrganization(site, uid) if not organization: organization = self.get_survey_answer(uid, 'w_organization') if not organization: organization = self.get_survey_answer(uid, 'w_organisation') phone = getUserPhoneNumber(site, uid) if not phone: phone = self.get_survey_answer(uid, 'w_telephone') if not phone: phone = self.get_survey_answer(uid, 'w_phone') account_subscription = AccountSubscription(uid, name, email, organization, phone) self._account_subscriptions.insert(uid, account_subscription) if meeting.auto_register: self._accept_account_subscription(uid) email_sender = self.getMeeting().getEmailSender() email_sender.send_account_subscription_email(account_subscription)
def getAttendeeInfo(self, uid): """ """ subscriptions = self.getSubscriptions() if subscriptions._is_signup(uid): user = subscriptions.getSignup(uid) name = user.name email = user.email organization = user.organization phone = user.phone else: site = self.getSite() name = getUserFullName(site, uid) email = getUserEmail(site, uid) organization = getUserOrganization(site, uid) phone = getUserPhoneNumber(site, uid) if not organization: organization = self.get_survey_answer(uid, 'w_organization') if not organization: organization = self.get_survey_answer(uid, 'w_organisation') if not phone: phone = self.get_survey_answer(uid, 'w_telephone') if not phone: phone = self.get_survey_answer(uid, 'w_phone') attendees = self._get_attendees() role = attendees[uid] ret = {'uid': uid, 'name': name, 'email': email, 'organization': organization, 'phone': phone, 'role': role} for k, v in ret.items(): if not isinstance(v, basestring): ret[k] = u'' return ret
def getParticipantInfo(self, uid): """ """ site = self.getSite() name = getUserFullName(site, uid) email = getUserEmail(site, uid) organisation = getUserOrganisation(site, uid) phone = getUserPhoneNumber(site, uid) return {'uid': uid, 'name': name, 'email': email, 'organisation': organisation, 'phone': phone}
def update_account_subscription(self, uid): """ """ site = self.getSite() name = getUserFullName(site, uid) email = getUserEmail(site, uid) organization = getUserOrganization(site, uid) phone = getUserPhoneNumber(site, uid) account_subscription = AccountSubscription(uid, name, email, organization, phone) self._account_subscriptions.update({uid: account_subscription})