~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/auth/php_session.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
    name = 'php_session'
23
23
 
24
 
    def __init__(self, apps=['egw'], s_path="/tmp", s_prefix="sess_", autocreate=False):
 
24
    def __init__(self, apps=['egw'], s_path="/tmp", s_prefix="sess_"):
25
25
        """ @param apps: A list of the enabled applications. See above for
26
26
            possible keys.
27
27
            @param s_path: The path where the PHP sessions are stored.
31
31
        self.s_path = s_path
32
32
        self.s_prefix = s_prefix
33
33
        self.apps = apps
34
 
        self.autocreate = autocreate
35
34
 
36
35
    def request(self, request, user_obj, **kw):
37
36
        def handle_egroupware(session):
73
72
                u.email = email
74
73
                changed = True
75
74
 
76
 
            if u and self.autocreate:
 
75
            if u:
77
76
                u.create_or_update(changed)
78
77
            if u and u.valid:
79
78
                return u, True # True to get other methods called, too