1. Set the appropriate fields in the user object which exists in memory
2. Create a new user object with all the information provided by the logged-in user
It seems that both of these methods have their own issues. I'd like to let the new user continue and log on to the BBS, as in the default new user process, but during my testing, the BBS disconnects when I'm done creating
a new user for some reason. Also, I'd like to show the user config at the end (using bbs.user_config()) so that the user can finalize their settings before continuing, but using method #1, it doesn't seem to be saving their information - It says they're user #0 and doesn't output their handle, and it also says their terminal type is TTY (instead of ANSI/ASCII).
I've seen a new user application script (written by Merlin/Tracker1 of The Roughnecks BBS), but it takes the route of creating a new user object and emailing the password to the user and then disconnecting. I'd rather not have to disconnect the user after they create a new user account.
Has anyone written their own custom new user script and found a way around this?
1. Set the appropriate fields in the user object which exists in
2. Create a new user object with all the information provided
by the logged-in user
Method #1 would definitely be wrong and lead to all kinds of problems,
if it even worked at all. The 'user' object should have (in hindsight) been called 'currentuser' or 'useron' or something more indicative that
it represents the authenticated/authorized user and no other user instance.
Now, I haven't tried to do exactly what you're doing (bypass all the built-in new-user creation logic in Synchronet), so I'm not sure off the top of my head that what you want to do is completely doable without modifying the C/C++ source code.
newuser = system.new_user("user name");
user.number = newuser.number;
... at least I think that should work. The normal built-in new user
process does all kinds of other stuff too, some of which may not be
immediatley obvious, so caveat emptor.
|4 (0 / 4)