Hopbot log for 2007-07-21 - Helma IRC channel: #helma on irc.freenode.net

2007-07-21:

[5:25] <jsp> ok, I've created my own PUser object that inherits from User for my purposes. It's beginning to look like Helma can't handle that. The session.login method called with username and password doesn't find the PUser, and when I find the PUser myself and pass it to session.login, it still bails
[5:25] <jsp> should I just add my methods to the User prototype directly? will that make it work?
[5:31] <jsp> (random note: telling helma that a prototype extends itself causes many, many exceptions)
[5:32] <jsp> it didn't help. helma still won't login my user
[5:35] <jsp> worked around by setting session.data.user instead, but seems like session.login should work!
[16:08] <zumbrunn> jsp, still having trouble with the User prototype and session.login?
[17:58] <jsp> yeah
[17:58] <jsp> I sent a message to the user list about it a little while ago that has more info
[18:42] <jsp> (*sigh* I would look less silly if I understood how IRC works)
[18:56] <zumbrunn> I'm just reading your message to the helma-user list
[18:57] <zumbrunn> I don't know why you're attaching users to UserMgr
[18:57] <zumbrunn> what is UserMgr?
[18:57] <zumbrunn> a prototype you created?
[18:59] <zumbrunn> jsp, ping
[18:59] <zumbrunn> sorry, forgot to mention your nick
[19:05] <zumbrunn> are you aware of these methods:
[19:05] <zumbrunn> http://helma.zumbrunn.net/reference/app.html#registerUser
[19:05] <zumbrunn> http://helma.zumbrunn.net/reference/app.html#getRegisteredUsers
[19:07] <jsp> was afk. yeah, usermgr is my own creation
[19:07] <jsp> I was not aware of registeruser
[19:09] <zumbrunn> you can directly extend the User prototype
[19:09] <zumbrunn> and you can directly "manage" the users through the built in methods Helma provides
[19:09] <jsp> fwiw, the documentation for User says only:
[19:09] <jsp> User HopObject User The built-in User prototype.
[19:09] <jsp> See: session.user session.login session.logout
[19:09] <jsp> if the See: section had mentioned those app. methods, that could have avoided me wasting a lot of time
[19:11] <jsp> gtg for a bit--now that I know where to look I should be able to figure it out
[19:11] <jsp> thanks
[19:11] <zumbrunn> thanks, I'll fix the reference to mention that
[19:20] <jsp> yeah, hm.. I hadn't really much looked at the app object.
[19:20] <jsp> how do I setup type.properties for User if I'm using the built-in db?
[19:22] <zumbrunn> you shouldn't need to specify one
[19:22] <zumbrunn> it just extends HopObject by default
[19:22] <jsp> ok, then what's the name of the property holding the username?
[19:23] <jsp> in case I want to get at it myself
[19:23] <zumbrunn> probably "name", but I'm not sure
[19:23] <zumbrunn> you'll have to check
[19:30] <jsp> also, do you know if I can change the username directly without confusing helma?
[19:33] <zumbrunn> I just checked in the code of one of my apps
[19:34] <zumbrunn> you can "get to the user" using the app.getUser method
[19:34] <jsp> yeah, I saw that
[19:34] <zumbrunn> that returns the _id of the User object
[19:35] <jsp> according to the docs it returns the User object itself?
[19:35] <jsp> (which would be a lot more useful and intuitive than returning the _id)
[19:36] <zumbrunn> yes, sorry... I did app.getUser('foo')._id in the code I was looking at
[19:47] <jsp> what I was wondering was in what property of User is the username stored so that I can get it if I just have a User object.
[19:47] <jsp> (moving boxes around the house between posts, hence the long lag)
[20:14] <zumbrunn> jsp, the username should be the "name" property, I believe
[20:15] <zumbrunn> app.getUser('foo').name == 'foo'
[20:16] <jsp> ok. I'll be able to tell through the shell (woot!) once I start redoing my users

 

 

In the channel now:

Logs by date: