Question: Switching Accounts
Question: Switching Accounts
For those of us who have gone to the trouble of making multiple accounts. Is there a way to switch accounts without logging out of one account first? Or should we just suck up and deal with the thirty seconds it would take to change ?
Chocolate sauce on a buttery nipple. *Bliss*
There is currently no method of logging in that does not require logging out. However, that feature is in development for release soon after the board is launched. Unless everything goes to hell, and then we'll see how long it takes.
This feature is working on v0.2 and on the original phpBB 1.4.4 test board, so it is possible. It has simply not been implemented here.
This feature is working on v0.2 and on the original phpBB 1.4.4 test board, so it is possible. It has simply not been implemented here.
I'm working on it...
That hack's been working on my phpBB 1.44 site for a while, but I haven't quite had the time to port it over to v2 yet. If Control would like the source, I am more than happy to provide it.
I'm working on it...
Lesson #1, posts appear <i>above</i> text box but don't refresh the screen...
I'm working on it...
Our 1.4.4 test site features this, as well, but it was a much simpler feature then. Simply making the login fields appear whether the user was logged in or not was enough in 1.4.4. In 2.0, the user must be logged out before the user can log back in again. If you discover a way to make it work on 2.0, please, let us know.Wildfire wrote: That hack's been working on my phpBB 1.44 site for a while, but I haven't quite had the time to port it over to v2 yet. If Control would like the source, I am more than happy to provide it.
Totally different approach, but I unfortunatly can't demonstate anymore, as the upgrade to PHP 4 broke the previously working one on my site.
In short, you add a PID field to the user table, and a place in the profile for it, and write three scripts.
one to have a user get a PID (ours were 5 digit self-selectable)
one to link accounts - in the profile, you ask for a username/password/PID set and if it all checks out, you make the PID for the user whose profile you're in the same as the PID entered.
one to do the account switching - edited the header to have a jumpbox opposite the login boxes at the top of the page, whenever you log in, the script reads all the matching username/password pairs out of the database that match the PID and populate the jumpbox with them. Pick one, hit Switch, and the script logs you out, and the account you selected in.
ie
User: Wildfire
Password: stuff
PID: 42
Register Gavin Heartsong, enter above info in the Account Link block. PID for Gavin Heartsong now equals 42. Somewhere on the page is a little jumpbox now, and whenever I log in as Wildfire, I can pick Gavin Heartsong out of the jumpbox, hit switch, and Wildfire is logged out, Gavin logged in, and the index is loaded.
In short, you add a PID field to the user table, and a place in the profile for it, and write three scripts.
one to have a user get a PID (ours were 5 digit self-selectable)
one to link accounts - in the profile, you ask for a username/password/PID set and if it all checks out, you make the PID for the user whose profile you're in the same as the PID entered.
one to do the account switching - edited the header to have a jumpbox opposite the login boxes at the top of the page, whenever you log in, the script reads all the matching username/password pairs out of the database that match the PID and populate the jumpbox with them. Pick one, hit Switch, and the script logs you out, and the account you selected in.
ie
User: Wildfire
Password: stuff
PID: 42
Register Gavin Heartsong, enter above info in the Account Link block. PID for Gavin Heartsong now equals 42. Somewhere on the page is a little jumpbox now, and whenever I log in as Wildfire, I can pick Gavin Heartsong out of the jumpbox, hit switch, and Wildfire is logged out, Gavin logged in, and the index is loaded.
That is how account linking currently works on ezboard. This would be a much-desired feature. How likely is it that you could assist in writing such a feature?Wildfire wrote: Totally different approach, but I unfortunatly can't demonstate anymore, as the upgrade to PHP 4 broke the previously working one on my site.
In short, you add a PID field to the user table, and a place in the profile for it, and write three scripts.
one to have a user get a PID (ours were 5 digit self-selectable)
one to link accounts - in the profile, you ask for a username/password/PID set and if it all checks out, you make the PID for the user whose profile you're in the same as the PID entered.
one to do the account switching - edited the header to have a jumpbox opposite the login boxes at the top of the page, whenever you log in, the script reads all the matching username/password pairs out of the database that match the PID and populate the jumpbox with them. Pick one, hit Switch, and the script logs you out, and the account you selected in.
ie
User: Wildfire
Password: stuff
PID: 42
Register Gavin Heartsong, enter above info in the Account Link block. PID for Gavin Heartsong now equals 42. Somewhere on the page is a little jumpbox now, and whenever I log in as Wildfire, I can pick Gavin Heartsong out of the jumpbox, hit switch, and Wildfire is logged out, Gavin logged in, and the index is loaded.
100%. I need to port it as I have 12 characters running around on MG, and refuse to log out and in each time. I need to get home first (Saturday) and then take a crack at seeing what the relavant differences between 1.4 and 2 are to make it function correctly. I will definietly need that extra field in the users table, though. The rest will depend on me mucking around in my test board to make it work right, and then I'll get it up here ASAP. I'll aim for one month as a timeframe.
I'm assuming you have access to the database and/or know SQL, if not I can pass you the neccessary script to run to add a field and the tiny changes you need to make to certain files.
I'm assuming you have access to the database and/or know SQL, if not I can pass you the neccessary script to run to add a field and the tiny changes you need to make to certain files.
We have access to the database, and are somewhat familiar at this point with SQL. If you can pass along what fields need to be added and where, and a list of changes to the files - basically, the same information you'll find for any mod - that should be sufficient. If it is not, we can always ask you.Wildfire wrote: I'm assuming you have access to the database and/or know SQL, if not I can pass you the neccessary script to run to add a field and the tiny changes you need to make to certain files.
This would be a much-desired mod. A month sounds like an excellent timeframe.
Its your decision as to what form the PID will take. Ours became PID, short for Personnel ID, since its a military-ish campaign base and was 5 digits. It can be anything you like, and either set by the user, or incremented by the database like the membership number is.
Either way, within the users table, a field called PID needs to be added of the proper type, short int, varchar, whatever. The only other changes are in the v2 equivalents of bbprofile.php and bbregister.php. In the UPDATE and INSERT commands which execute at the end of the file (when the user hits 'Submit'), the field name needs to be tacked on the the list of things its submitting.
The rest will depend on the specific implimentation. If you want to wait, I can also send you the actual lines of code in context once I get back to my machine.
And I have just now realized that in the space of about 6 hours, I have suddenly become the Bulldrek phpBB code slut...
Either way, within the users table, a field called PID needs to be added of the proper type, short int, varchar, whatever. The only other changes are in the v2 equivalents of bbprofile.php and bbregister.php. In the UPDATE and INSERT commands which execute at the end of the file (when the user hits 'Submit'), the field name needs to be tacked on the the list of things its submitting.
The rest will depend on the specific implimentation. If you want to wait, I can also send you the actual lines of code in context once I get back to my machine.
And I have just now realized that in the space of about 6 hours, I have suddenly become the Bulldrek phpBB code slut...
It can be an auto-incremental I suppose. In which case, it would work slightly differently, but since it was setup to be self-selectable (we're a picky bunch of people who have poor memories, assigned numbers didn't go over too well), it has to be included in the phpBB code that stores user details into the database.
If its auto incremental, then you don't need to change the lines, but make sure the script that creates PID throws the value back to you so you know what it is, and then make sure you have a way much like password retrival to get it back. In a self-select system, you just change the PID in an account, and then go muck with all the other profiles to relink everything.
If its auto incremental, then you don't need to change the lines, but make sure the script that creates PID throws the value back to you so you know what it is, and then make sure you have a way much like password retrival to get it back. In a self-select system, you just change the PID in an account, and then go muck with all the other profiles to relink everything.