|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
IIP 5.3.1, index.php // authenticate visitor<br /> $userob = new user;<br /> $user = $userob -> authenticate("");<br /> <br /> $user = $userob -> authenticate("U_Username,U_PicturePosts,..."); Does the first authenticate() call serve any purpose?
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
I thought about this also... and decided to delete the first one. 
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
I am not the expert. But I wouldn't think so. I also ponder if duplicate authenticate calls (like in the sidebar) create trouble. The sidebar would need it if it's on the left... but then the threads on the right also calls it. On the right, it would be unneeded. Some (admins) get an error at the top of the sidebar when it's on the right about output already being sent.  But it's not consistant. 
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
I haven't looked at the sidebar thing, but in this case, it should be orphan. There's no additional code or includes between the two calls and the user object gets overwritten.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
The only thing is that authenticate() does some tricky stuff, and I was wondering if there's some subtle side effect that's being depended on.
|
|
|
|
Joined: Feb 2002
Posts: 950
Hacker
|
Hacker
Joined: Feb 2002
Posts: 950 |
Well, remember, SideBar needs some infromation of its own. I tried to change it to a simple SELECT, but it didnt take so was going to try again later.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
That's true....
But maybe the info that the sidebar needs should be added into the Authenticate function of ubbt.inc.php.
Although if there's no problem with calling it twice, then it can't hurt.
I've asked Rick's opinion on calling it twice.
|
|
|
|
Joined: Feb 2001
Posts: 2,268
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 2,268 |
I've been looking at something similar with the data base queries in the addons. I't sems to me that it would be easier (and faster) to combine some of the queries and then set up a loop to create arrays out of them. Then just use a loop in a template to echo out the html / array data (kinda like the way the postlist and showflat / showthreaded pages work).
The addons also use some of the same variables, so I'm consolidating all of them into an "addon.inc.php" file. No sense in wasting time creating the same variables over and over...
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|