$user = $userob -> ...">
$user = $userob -> ...">
 
Previous Thread
Next Thread
Print Thread
Rate Thread
#245347 05/05/2003 11:59 AM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
IIP 5.3.1, index.php

Code
	// 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?

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
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
Offline
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
Offline
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.

Sponsored Links
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
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
Offline
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...


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)