Account Switch Primer
Account Switch Primer
The purpose of this mod is for people to be able to link several account together, and easily switch between them all. Here's the super-quick primer on what you need to do to get started:
Pick an account
There isn't really a primary account with this setup, but you have to start somewhere. Go into the profile for the account. Scroll down a bit and you'll see a new section that says Account Link. Off to the side, there is a little text that says 'Click here to obtain a PID'. Click there You'll be on a page caled PID Request. Enter the usename and password for the account you are in, and then a 5 digit Personal ID. Its a stupid script, if your PID is taken, all it will do is say sorry, that's in use, try again. If its not taken, the script will say your profile has been updated, and set your PID in the database. Remember that PID
Link an account
Log out of the account you just set your PID in. Login to an account you'd like to link to the first. Go into your profile, and scroll down to Account Link, but instead of clicking to get a PID, you will enter the Username and Password of that first account, and the PID you just set. Submit the profile, and now when you go to the Index, the Switch jumpbox in the upper left should have the two account names listed in it. You can now link any number of accounts with your PID and a username/password pair of an account that you have already linked.
Switching Accounts
Go up to the dropbox in the upper left, choose which linked account you want to switch to, and hit Switch. That's it. The account you were in is logged out, and the one you picked logged in.
Pick an account
There isn't really a primary account with this setup, but you have to start somewhere. Go into the profile for the account. Scroll down a bit and you'll see a new section that says Account Link. Off to the side, there is a little text that says 'Click here to obtain a PID'. Click there You'll be on a page caled PID Request. Enter the usename and password for the account you are in, and then a 5 digit Personal ID. Its a stupid script, if your PID is taken, all it will do is say sorry, that's in use, try again. If its not taken, the script will say your profile has been updated, and set your PID in the database. Remember that PID
Link an account
Log out of the account you just set your PID in. Login to an account you'd like to link to the first. Go into your profile, and scroll down to Account Link, but instead of clicking to get a PID, you will enter the Username and Password of that first account, and the PID you just set. Submit the profile, and now when you go to the Index, the Switch jumpbox in the upper left should have the two account names listed in it. You can now link any number of accounts with your PID and a username/password pair of an account that you have already linked.
Switching Accounts
Go up to the dropbox in the upper left, choose which linked account you want to switch to, and hit Switch. That's it. The account you were in is logged out, and the one you picked logged in.
_
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
- JohnnyRico
- Wuffle Student
- Posts: 1254
- Joined: Mon Mar 18, 2002 1:11 pm
- Location: Hell on Earth, in the Greatest state of the Union
- Contact:
-
- Wuffle Grand Master
- Posts: 1848
- Joined: Fri Apr 12, 2002 3:16 am
Thanks guys Actually, this was the cause of PHP burnout for a while, coding it and trying to keep it simple so that it can go into the phpBB Community Mods. (Which, hopefully will go through soon). Got a few other web projects I'm behind in, and some non-coding projects to finish, and I'll be back working on the Suggestion list.
_
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
Thanks guys Actually this was the cause of earlier PHP burnout, tweaking it and documenting it for submission to the phpBB Community. Got a few projects both coding and not I've been neglecting, but I'll be back working on the Suggestions list soon.
_
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
Two Questions:
1) What is a 'Buckeye'? Dare I ask?
2) Why won't the board let me enter the same email address for multiple accounts? Is it used as a primary key? Or just a security feature, so I can't enter someone else's email by mistake?
1) What is a 'Buckeye'? Dare I ask?
2) Why won't the board let me enter the same email address for multiple accounts? Is it used as a primary key? Or just a security feature, so I can't enter someone else's email by mistake?
_<font color="#5C7898">"You know, Memory?
I'd have to say that you are one cool, fucked-up guy.
Just like the rest of us.
It's a pleasure reading your posts in the morning over a cup of coffee. “ – JetPlane</font>
I'd have to say that you are one cool, fucked-up guy.
Just like the rest of us.
It's a pleasure reading your posts in the morning over a cup of coffee. “ – JetPlane</font>
Buckeyes! ^_^ Loverly concoctions of chocolate coated peanut butter with extra sugar...yummy
Email addresses, er, all my accounts have the same email address, possibly a 2.0 and higher feature that got turned on by default on upgrade?
Email addresses, er, all my accounts have the same email address, possibly a 2.0 and higher feature that got turned on by default on upgrade?
_
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
Noting 3-2's reaction I'm guessing it's going to be turned off again.Wildfire wrote: Email addresses, er, all my accounts have the same email address, possibly a 2.0 and higher feature that got turned on by default on upgrade?
Any chance you can let me know when this has happened?
Last edited by Memory on Thu May 23, 2002 1:39 pm, edited 1 time in total.
_<font color="#5C7898">"You know, Memory?
I'd have to say that you are one cool, fucked-up guy.
Just like the rest of us.
It's a pleasure reading your posts in the morning over a cup of coffee. “ – JetPlane</font>
I'd have to say that you are one cool, fucked-up guy.
Just like the rest of us.
It's a pleasure reading your posts in the morning over a cup of coffee. “ – JetPlane</font>
Actually, wouldn't be too terribly hard, have to move autologin to a profile field, and if its set to "On", the switch will set that flag when it starts the new session. Will require you set autologin to "On" for every account, but should work. I'll get back to that sometime soon.
_
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
-
- Tasty Human
- Posts: 1
- Joined: Wed Mar 13, 2002 1:37 pm
So what you're saying, 32, is that if I just close the browser window, I'd still be logged in when I open a new window later and head over here?
Hmmm ... not sure about that. When I'm at work I don't always remember to log out; I may just ALT+F4, lock the workstation and go.
Hmmm ... not sure about that. When I'm at work I don't always remember to log out; I may just ALT+F4, lock the workstation and go.
<hr size=1 color=#5c7898><font face=font face="Verdana, Arial, Helvetica" color=#6600FF>The more I overcome, the stronger I become
- Angel of Ruin<a href=http:\/www.chaosengine.com>.</a></font>
- Angel of Ruin<a href=http:\/www.chaosengine.com>.</a></font>
Well, that's the problem. Same as it was on v0.2, if you recall. If for no other reason than I'm used to it, I don't mind. But I generally only login from secure locations, so...Sorrow wrote:So what you're saying, 32, is that if I just close the browser window, I'd still be logged in when I open a new window later and head over here?
Hmmm ... not sure about that. When I'm at work I don't always remember to log out; I may just ALT+F4, lock the workstation and go.
Been a while since I've logged into v0.2 Actually, it's probably not a problem, since the workstation's generally locked if I'm not there.
<hr size=1 color=#5c7898><font face=font face="Verdana, Arial, Helvetica" color=#6600FF>The more I overcome, the stronger I become
- Angel of Ruin<a href=http:\/www.chaosengine.com>.</a></font>
- Angel of Ruin<a href=http:\/www.chaosengine.com>.</a></font>
Just a reminder, your PID MUST be 5 digits, as in the 0 through 9 variety. Also '0' is no longer a valid PID, its being used as an error check condition. I believe those affected by the verification code change have already been notified.a 5 digit Personal ID
_
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
"Are you alright?"
"I'm a little fucked up in general so its hard to tell."
Its a very stupid query that simply says give me accounts with the PID, so however they are sorted in the user table (generally, but not always, by user_id) is however it gets displayed. Did you want it sorted by something in particular?
10:41 Kai: Ohayou minna
10:42 Adam: ENGLISH MOTHERFUCKER!
10:44 Kai: Fuck off, how's that? ;P
10:45 Adam: Much better.
I'm trying to install this switch on my own phpBB - I know this isn't a support forum for this hack, but I'm having lots of problems and don't know where else to go for help!
So far I've dealt with one problem, which was that when I was trying to assign a PID to an account I was getting the following error:
"Sorry, Personnel IDs must be numerical in value. Please go back and try again.
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
This was fixed using some code suggested on the forums at phpbbhacks.com:
In pid.php, replace:
$pid = (ereg("^[0-9]+$", $pid)) ? $pid : '0';
with:
$pid = (ereg("^[0-9]+$", $HTTP_POST_VARS['pid'])) ? $HTTP_POST_VARS['pid'] : '0';
$username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : '';
$username = substr(str_replace("\\'", "'", $username), 0, 25);
$username = str_replace("'", "\\'", $username);
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
So now I can assign a pid to an account. However, I still can't manage to link one account to another. There was a suggestion on the same discussion at phpbbhacks.com (which you can see here: http://www.phpbbhacks.com/forums/viewtopic.php?t=34389 ), that this is something to do with an unassigned variable or two.
Can anyone help with this? Please feel free to pm me rather than clogging up this board with technical discussions, if you'd rather.
Many thanks in advance.
~m~
So far I've dealt with one problem, which was that when I was trying to assign a PID to an account I was getting the following error:
"Sorry, Personnel IDs must be numerical in value. Please go back and try again.
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
This was fixed using some code suggested on the forums at phpbbhacks.com:
In pid.php, replace:
$pid = (ereg("^[0-9]+$", $pid)) ? $pid : '0';
with:
$pid = (ereg("^[0-9]+$", $HTTP_POST_VARS['pid'])) ? $HTTP_POST_VARS['pid'] : '0';
$username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : '';
$username = substr(str_replace("\\'", "'", $username), 0, 25);
$username = str_replace("'", "\\'", $username);
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
So now I can assign a pid to an account. However, I still can't manage to link one account to another. There was a suggestion on the same discussion at phpbbhacks.com (which you can see here: http://www.phpbbhacks.com/forums/viewtopic.php?t=34389 ), that this is something to do with an unassigned variable or two.
Can anyone help with this? Please feel free to pm me rather than clogging up this board with technical discussions, if you'd rather.
Many thanks in advance.
~m~
Thanks - I tried that, but still no joy
Just to clarify, my current situation is that I have 2 accounts, one has a pid assigned (I have checked that it really is assigned, and really is the correct value, by looking at the database directly).
The second account has no pid. When I go in to the profile of the second account and try to link it to the first, it claims it has linked properly (I get the "your profile has been updated" message), but the accounts don't link.
When logged into the first account, which has a pid, that account is visible in the account switch box at the top of each page, but the second account isn't. When logged into the second account, there are no options listed in the account switch box.
Just to clarify, my current situation is that I have 2 accounts, one has a pid assigned (I have checked that it really is assigned, and really is the correct value, by looking at the database directly).
The second account has no pid. When I go in to the profile of the second account and try to link it to the first, it claims it has linked properly (I get the "your profile has been updated" message), but the accounts don't link.
When logged into the first account, which has a pid, that account is visible in the account switch box at the top of each page, but the second account isn't. When logged into the second account, there are no options listed in the account switch box.
Something has occurred to me, that fits with the comments on phpbbhacks.com that it might be something to do with undefined variables.
When you enter your username, password and pid of the account you want to link on the profile page, the variables are called linkname, linkpass and linkpid, respectively.
The form action is "login.php", but when I look through login.php, none of the Account Switch variables, linkname, linkpass, or linkpid, are mentioned anywhere. I'm guessing they should be? So does login.php need to be altered somehow?
This is just a guess on my part, though - I could be totally wrong!
Thanks again
~m~
When you enter your username, password and pid of the account you want to link on the profile page, the variables are called linkname, linkpass and linkpid, respectively.
The form action is "login.php", but when I look through login.php, none of the Account Switch variables, linkname, linkpass, or linkpid, are mentioned anywhere. I'm guessing they should be? So does login.php need to be altered somehow?
This is just a guess on my part, though - I could be totally wrong!
Thanks again
~m~
Best guess is that between versions this was tested on, phpBB discontinued the use of register_globals, meaning variables are handled in a completely different manner, which may cause things to not work.
10:41 Kai: Ohayou minna
10:42 Adam: ENGLISH MOTHERFUCKER!
10:44 Kai: Fuck off, how's that? ;P
10:45 Adam: Much better.
In case anyone else is interested, I have finally solved this problem, and posted the full solution here:
http://www.phpbbhacks.com/forums/viewtopic.php?p=190591
~m~
http://www.phpbbhacks.com/forums/viewtopic.php?p=190591
~m~