Mercurial > kallithea
comparison rhodecode/lib/celerylib/tasks.py @ 1944:5fc9c92025c1 beta
white space cleanup
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 22 Jan 2012 21:23:32 +0200 |
parents | 58c684bacdad |
children | a76e9bacbedc |
comparison
equal
deleted
inserted
replaced
1942:c59cc8231f3c | 1944:5fc9c92025c1 |
---|---|
249 def send_password_link(user_email): | 249 def send_password_link(user_email): |
250 from rhodecode.model.notification import EmailNotificationModel | 250 from rhodecode.model.notification import EmailNotificationModel |
251 | 251 |
252 log = get_logger(send_password_link) | 252 log = get_logger(send_password_link) |
253 DBS = get_session() | 253 DBS = get_session() |
254 | 254 |
255 try: | 255 try: |
256 user = User.get_by_email(user_email) | 256 user = User.get_by_email(user_email) |
257 if user: | 257 if user: |
258 log.debug('password reset user found %s' % user) | 258 log.debug('password reset user found %s' % user) |
259 link = url('reset_password_confirmation', key=user.api_key, | 259 link = url('reset_password_confirmation', key=user.api_key, |
279 def reset_user_password(user_email): | 279 def reset_user_password(user_email): |
280 from rhodecode.lib import auth | 280 from rhodecode.lib import auth |
281 | 281 |
282 log = get_logger(reset_user_password) | 282 log = get_logger(reset_user_password) |
283 DBS = get_session() | 283 DBS = get_session() |
284 | 284 |
285 try: | 285 try: |
286 try: | 286 try: |
287 user = User.get_by_email(user_email) | 287 user = User.get_by_email(user_email) |
288 new_passwd = auth.PasswordGenerator().gen_password(8, | 288 new_passwd = auth.PasswordGenerator().gen_password(8, |
289 auth.PasswordGenerator.ALPHABETS_BIG_SMALL) | 289 auth.PasswordGenerator.ALPHABETS_BIG_SMALL) |
323 :param body: body of the mail | 323 :param body: body of the mail |
324 :param html_body: html version of body | 324 :param html_body: html version of body |
325 """ | 325 """ |
326 log = get_logger(send_email) | 326 log = get_logger(send_email) |
327 DBS = get_session() | 327 DBS = get_session() |
328 | 328 |
329 email_config = config | 329 email_config = config |
330 subject = "%s %s" % (email_config.get('email_prefix'), subject) | 330 subject = "%s %s" % (email_config.get('email_prefix'), subject) |
331 if not recipients: | 331 if not recipients: |
332 # if recipients are not defined we send to email_config + all admins | 332 # if recipients are not defined we send to email_config + all admins |
333 admins = [u.email for u in User.query() | 333 admins = [u.email for u in User.query() |