Revision c9fdfa27 logic/users.py

b/logic/users.py
3 3
#
4 4
# Copyright 2010 Greek Research and Technology Network
5 5
#
6
from django.conf import settings
6 7

  
7 8
from synnefo.db.models import SynnefoUser
8 9
from django.db import transaction
9 10
import hashlib
10 11
import time
11 12
import string
12
from datetime import datetime
13
from datetime import datetime, timedelta
13 14

  
14 15
@transaction.commit_on_success
15 16
def _register_user(f, u, unq, t):
......
59 60

  
60 61
    user.auth_token = md5.hexdigest()
61 62
    user.auth_token_created = datetime.now()
62

  
63
    user.auth_token_expires = user.auth_token_created + \
64
                              timedelta(hours=settings.AUTH_TOKEN_DURATION)
63 65
    user.save()
64 66

  
65 67
#def login(username, password):

Also available in: Unified diff