def _process(self): authManager = AuthenticatorMgr() #first, check if login is free if not authManager.isLoginAvailable(self._login): self._redirect(self._fromURL + "&msg=Login not avaible") return #then, check if password is OK if self._pwd != self._pwdBis: self._redirect(self._fromURL + "&msg=You must enter the same password twice") return #create the indentity li = user.LoginInfo( self._login, self._pwd ) id = authManager.createIdentity( li, self._avatar, self._system ) authManager.add( id ) #commit and if OK, send activation mail DBMgr.getInstance().commit() scr = mail.sendConfirmationRequest(self._avatar) scr.send() self._redirect(urlHandlers.UHUserDetails.getURL(self._avatar)) # to set to the returnURL
def _process( self ): ih = AuthenticatorMgr() #first, check if login is free if not ih.isLoginFree(self._login): self._redirect(self._fromURL + "&msg=Login not avaible") return #then, check if password is OK if self._pwd != self._pwdBis: self._redirect(self._fromURL + "&msg=You must enter the same password twice") return #create the indentity li = user.LoginInfo( self._login, self._pwd ) id = ih.createIdentity( li, self._avatar, self._system ) ih.add( id ) #commit and if OK, send activation mail DBMgr.getInstance().commit() scr = mail.sendConfirmationRequest(self._avatar) scr.send() self._redirect( urlHandlers.UHUserDetails.getURL( self._avatar ) ) #to set to the returnURL
def _process( self ): save = False ih = AuthenticatorMgr() minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() self._params["msg"] = "" if self._save: save = True #check submited data if not self._params.get("name",""): self._params["msg"] += _("You must enter a name.")+"<br>" save = False if not self._params.get("surName",""): self._params["msg"] += _("You must enter a surname.")+"<br>" save = False if not self._params.get("organisation",""): self._params["msg"] += _("You must enter the name of your organisation.")+"<br>" save = False if not self._params.get("email",""): self._params["msg"] += _("You must enter an email address.")+"<br>" save = False if not self._params.get("login",""): self._params["msg"] += _("You must enter a login.")+"<br>" save = False if not self._params.get("password",""): self._params["msg"] += _("You must define a password.")+"<br>" save = False if self._params.get("password","") != self._params.get("passwordBis",""): self._params["msg"] += _("You must enter the same password twice.")+"<br>" save = False if not ih.isLoginFree(self._params.get("login","")): self._params["msg"] += _("Sorry, the login you requested is already in use. Please choose another one.")+"<br>" save = False if not self._validMail(self._params.get("email","")): self._params["msg"]+= _("You must enter a valid email address") save = False if save: #Data are OK, Now check if there is an existing user or create a new one ah = user.AvatarHolder() res = ah.match({"email": self._params["email"]}, exact=1, forceWithoutExtAuth=True) if res: #we find a user with the same email a = res[0] #check if the user have an identity: if a.getIdentityList(): self._redirect( urlHandlers.UHUserExistWithIdentity.getURL(a)) return else: #create the identity to the user and send the comfirmatio email _UserUtils.setUserData( a, self._params ) li = user.LoginInfo( self._params["login"], self._params["password"] ) id = ih.createIdentity( li, a, "Local" ) ih.add( id ) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() else: a = user.Avatar() _UserUtils.setUserData( a, self._params ) ah.add(a) li = user.LoginInfo( self._params["login"], self._params["password"] ) id = ih.createIdentity( li, a, "Local" ) ih.add( id ) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() self._redirect(urlHandlers.UHUserCreated.getURL( a )) else: cp=None if self._params.has_key("cpEmail"): ph=pendingQueues.PendingQueuesHolder() cp=ph.getFirstPending(self._params["cpEmail"]) if self._aw.getUser() and self._aw.getUser() in minfo.getAdminList().getList(): p = adminPages.WPUserCreation( self, self._params, cp ) else: p = adminPages.WPUserCreationNonAdmin( self, self._params, cp ) return p.display()
def _process( self ): av = AvatarHolder().getById(self._userId) sm = mail.sendConfirmationRequest(av) sm.send() self._redirect(urlHandlers.UHSignIn.getURL())
def _process(self): av = AvatarHolder().getById(self._userId) sm = mail.sendConfirmationRequest(av) sm.send() self._redirect(urlHandlers.UHSignIn.getURL())
def _process(self): save = False authManager = AuthenticatorMgr() minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() self._params["msg"] = "" if self._save: save = True #check submited data if not self._params.get("name",""): self._params["msg"] += _("You must enter a name.")+"<br>" save = False if not self._params.get("surName",""): self._params["msg"] += _("You must enter a surname.")+"<br>" save = False if not self._params.get("organisation",""): self._params["msg"] += _("You must enter the name of your organisation.")+"<br>" save = False if not self._params.get("email",""): self._params["msg"] += _("You must enter an email address.")+"<br>" save = False if not self._params.get("login",""): self._params["msg"] += _("You must enter a login.")+"<br>" save = False if not self._params.get("password",""): self._params["msg"] += _("You must define a password.")+"<br>" save = False if self._params.get("password","") != self._params.get("passwordBis",""): self._params["msg"] += _("You must enter the same password twice.")+"<br>" save = False if not authManager.isLoginAvailable(self._params.get("login", "")): self._params["msg"] += _("Sorry, the login you requested is already in use. Please choose another one.")+"<br>" save = False if not self._validMail(self._params.get("email","")): self._params["msg"] += _("You must enter a valid email address") save = False if save: #Data are OK, Now check if there is an existing user or create a new one ah = user.AvatarHolder() res = ah.match({"email": self._params["email"]}, exact=1, searchInAuthenticators=False) if res: #we find a user with the same email a = res[0] #check if the user have an identity: if a.getIdentityList(): self._redirect(urlHandlers.UHConfUserExistWithIdentity.getURL(self._conf, a)) return else: #create the identity to the user and send the comfirmation email li = user.LoginInfo(self._params["login"], self._params["password"]) id = authManager.createIdentity(li, a, "Local") authManager.add(id) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a, self._conf).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() else: a = user.Avatar() _UserUtils.setUserData( a, self._params ) ah.add(a) li = user.LoginInfo( self._params["login"], self._params["password"] ) id = authManager.createIdentity( li, a, "Local" ) authManager.add( id ) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() self._redirect( urlHandlers.UHConfUserCreated.getURL( self._conf, a ) ) else: p = conferences.WPConfUserCreation( self, self._conf, self._params ) return p.display()
def _process(self): save = False ih = AuthenticatorMgr() minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() self._params["msg"] = "" if self._save: save = True #check submited data if not self._params.get("name", ""): self._params["msg"] += _("You must enter a name.") + "<br>" save = False if not self._params.get("surName", ""): self._params["msg"] += _("You must enter a surname.") + "<br>" save = False if not self._params.get("organisation", ""): self._params["msg"] += _( "You must enter the name of your organisation.") + "<br>" save = False if not self._params.get("email", ""): self._params["msg"] += _( "You must enter an email address.") + "<br>" save = False if not self._params.get("login", ""): self._params["msg"] += _("You must enter a login.") + "<br>" save = False if not self._params.get("password", ""): self._params["msg"] += _( "You must define a password.") + "<br>" save = False if self._params.get("password", "") != self._params.get( "passwordBis", ""): self._params["msg"] += _( "You must enter the same password twice.") + "<br>" save = False if not ih.isLoginFree(self._params.get("login", "")): self._params["msg"] += _( "Sorry, the login you requested is already in use. Please choose another one." ) + "<br>" save = False if not self._validMail(self._params.get("email", "")): self._params["msg"] += _( "You must enter a valid email address") save = False if save: #Data are OK, Now check if there is an existing user or create a new one ah = user.AvatarHolder() res = ah.match({"email": self._params["email"]}, exact=1, forceWithoutExtAuth=True) if res: #we find a user with the same email a = res[0] #check if the user have an identity: if a.getIdentityList(): self._redirect( urlHandlers.UHUserExistWithIdentity.getURL(a)) return else: #create the identity to the user and send the comfirmatio email _UserUtils.setUserData(a, self._params) li = user.LoginInfo(self._params["login"], self._params["password"]) id = ih.createIdentity(li, a, "Local") ih.add(id) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() else: a = user.Avatar() _UserUtils.setUserData(a, self._params) ah.add(a) li = user.LoginInfo(self._params["login"], self._params["password"]) id = ih.createIdentity(li, a, "Local") ih.add(id) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() self._redirect(urlHandlers.UHUserCreated.getURL(a)) else: cp = None if self._params.has_key("cpEmail"): ph = pendingQueues.PendingQueuesHolder() cp = ph.getFirstPending(self._params["cpEmail"]) if self._aw.getUser() and self._aw.getUser() in minfo.getAdminList( ).getList(): p = adminPages.WPUserCreation(self, self._params, cp) else: p = adminPages.WPUserCreationNonAdmin(self, self._params, cp) return p.display()
def _process(self): save = False authManager = AuthenticatorMgr() minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() self._params["msg"] = "" if self._save: save = True #check submited data if not self._params.get("name", ""): self._params["msg"] += _("You must enter a name.") + "<br>" save = False if not self._params.get("surName", ""): self._params["msg"] += _("You must enter a surname.") + "<br>" save = False if not self._params.get("organisation", ""): self._params["msg"] += _( "You must enter the name of your organisation.") + "<br>" save = False if not self._params.get("email", ""): self._params["msg"] += _( "You must enter an email address.") + "<br>" save = False if not self._params.get("login", ""): self._params["msg"] += _("You must enter a login.") + "<br>" save = False if not self._params.get("password", ""): self._params["msg"] += _( "You must define a password.") + "<br>" save = False if self._params.get("password", "") != self._params.get( "passwordBis", ""): self._params["msg"] += _( "You must enter the same password twice.") + "<br>" save = False if not authManager.isLoginAvailable(self._params.get("login", "")): self._params["msg"] += _( "Sorry, the login you requested is already in use. Please choose another one." ) + "<br>" save = False if not self._validMail(self._params.get("email", "")): self._params["msg"] += _( "You must enter a valid email address") save = False if save: #Data are OK, Now check if there is an existing user or create a new one ah = user.AvatarHolder() res = ah.match({"email": self._params["email"]}, exact=1, searchInAuthenticators=False) if res: #we find a user with the same email a = res[0] #check if the user have an identity: if a.getIdentityList(): self._redirect( urlHandlers.UHConfUserExistWithIdentity.getURL( self._conf, a)) return else: #create the identity to the user and send the comfirmation email li = user.LoginInfo(self._params["login"], self._params["password"]) id = authManager.createIdentity(li, a, "Local") authManager.add(id) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a, self._conf).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() else: a = user.Avatar() _UserUtils.setUserData(a, self._params) ah.add(a) li = user.LoginInfo(self._params["login"], self._params["password"]) id = authManager.createIdentity(li, a, "Local") authManager.add(id) DBMgr.getInstance().commit() if minfo.getModerateAccountCreation(): mail.sendAccountCreationModeration(a).send() else: mail.sendConfirmationRequest(a).send() if minfo.getNotifyAccountCreation(): mail.sendAccountCreationNotification(a).send() self._redirect(urlHandlers.UHConfUserCreated.getURL(self._conf, a)) else: p = conferences.WPConfUserCreation(self, self._conf, self._params) return p.display()