~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/userservice/__init__.py

  • Committer: me at id
  • Date: 2009-01-15 03:06:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:branches%2Fstorm:1151
userservice/update_user: Only get the user once, not for each attr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
364
364
        # If login not specified, update yourself
365
365
        login = req.user.login
366
366
 
 
367
    user = ivle.database.User.get_by_login(req.store, login)
 
368
 
367
369
    # Make a dict of fields to update
368
370
    oldpassword = fields.getfirst('oldpass')
369
 
    
370
371
    for f in fieldlist:
371
372
        val = fields.getfirst(f)
372
373
        if val is not None:
373
374
            # Note: May be rolled back if auth check below fails
374
 
            user = ivle.database.User.get_by_login(req.store, login)
375
375
            setattr(user, f, val.value.decode('utf-8'))
376
376
        else:
377
377
            pass