예제 #1
0
파일: controllers.py 프로젝트: jas01/indico
 def _send_confirmation(self, email):
     token_storage = GenericCache('confirm-email')
     data = {'email': email, 'user_id': self.user.id}
     token = make_unique_token(lambda t: not token_storage.get(t))
     token_storage.set(token, data, 24 * 3600)
     send_email(make_email(email, template=get_template_module('users/emails/verify_email.txt',
                                                               user=self.user, email=email, token=token)))
예제 #2
0
 def _send_confirmation(self, email):
     token_storage = GenericCache('confirm-email')
     data = {'email': email, 'user_id': self.user.id}
     token = make_unique_token(lambda t: not token_storage.get(t))
     token_storage.set(token, data, 24 * 3600)
     send_email(make_email(email, template=get_template_module('users/emails/verify_email.txt',
                                                               user=self.user, email=email, token=token)))
예제 #3
0
 def _get_token():
     token = make_unique_token(lambda t: t not in tokens)
     tokens.add(token)
     return token
예제 #4
0
 def _get_token():
     token = make_unique_token(lambda t: t not in tokens)
     tokens.add(token)
     return token