@expose("<STR_LIT>")<EOL><INDENT>def activation(self, activation_hash):<DEDENT>
reg = self.appbuilder.sm.find_register_user(activation_hash)<EOL>if not reg:<EOL><INDENT>log.error(c.LOGMSG_ERR_SEC_NO_REGISTER_HASH.format(activation_hash))<EOL>flash(as_unicode(self.false_error_message), "<STR_LIT>")<EOL>return redirect(self.appbuilder.get_url_for_index)<EOL><DEDENT>if not self.appbuilder.sm.add_user(<EOL>username=reg.username,<EOL>email=reg.email,<EOL>first_name=reg.first_name,<EOL>last_name=reg.last_name,<EOL>role=self.appbuilder.sm.find_role(<EOL>self.appbuilder.sm.auth_user_registration_role<EOL>),<EOL>hashed_password=reg.password,<EOL>):<EOL><INDENT>flash(as_unicode(self.error_message), "<STR_LIT>")<EOL>return redirect(self.appbuilder.get_url_for_index)<EOL><DEDENT>else:<EOL><INDENT>self.appbuilder.sm.del_register_user(reg)<EOL>return self.render_template(<EOL>self.activation_template,<EOL>username=reg.username,<EOL>first_name=reg.first_name,<EOL>last_name=reg.last_name,<EOL>appbuilder=self.appbuilder,<EOL>)<EOL><DEDENT>
Endpoint to expose an activation url, this url
is sent to the user by email, when accessed the user is inserted
and activated