Beispiel #1
0
 def GET(self, id):
     form = user_form()
     user = get_user_byid(id)
     form.fill(user)
     groups = get_groups()
     user_groups = user.groups
     req = web.ctx.req
     req.update({
         'uid': user.id,
         'form': form,
         'groups': groups,
         'user_groups': user_groups,
         })
     return render.user_edit(**req)
Beispiel #2
0
def get_logined_user():
    if is_logined():
        uid = web.ctx.session._userid
        return get_user_byid(uid)