[Helma-user] session.login() troubles
Joshua Paine
joshua at papercrown.org
Sat Jul 21 18:29:01 CEST 2007
I was trying to follow the path of least resistance and use Helma's
built-in session/login management stuff. So I made my own prototype
PUser that _extends the built-in User. I found that I was unable to get
a login when passing the username and password of a PUser I had created
to session.login(). So I tried selecting the correct PUser myself and
passing it to session.login(): still returned false. I tried setting
session.user directly and found (unsurprisingly) that it was read-only.
So I thought maybe you're not supposed to _extend User but just add you
own functions to User itself. So I renamed my PUser folder to User and
changed all references. I got my homemade user listing and creating
stuff working again, but still no dice with session.login passing either
name and password or User object.
Things I've thought of that might have some impact:
- Users are children of UesrMgr, not Root.
- I could have the properties named wrong (username and password)
- UserMgr's _children collection has no accessname--just accesses by _id
- I'm using the native db
I don't know if any of the above matter, but I would still expect
session.login(myUser) to work even if it couldn't find a user by usernam
and password. so far, though, session.login always returns false.
I've worked around for now by setting and checking for session.data.user.
Any ideas? I couldn't find any substantial documentation of User or
session.login, so maybe there's something basic I'm doing wrong?
-Joshua
More information about the Helma-user
mailing list