php forum
php mysql forum
php mysql smarty
 
Topic Options
#245347 - 05/05/03 11:59 AM Two calls to authenticate
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
IIP 5.3.1, index.php<br /><br />
Code:
	// authenticate visitor<br />	$userob = new user;<br />	$user = $userob -&gt; authenticate("");<br />	<br />	$user = $userob -&gt; authenticate("U_Username,U_PicturePosts,...");
<br /><br />Does the first authenticate() call serve any purpose?<br />
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#245348 - 05/05/03 12:15 PM Re: Two calls to authenticate [Re: joeuser]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
I thought about this also... and decided to delete the first one. <img src="/forum/images/graemlins/wink.gif" alt="" /><br />
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#245349 - 05/05/03 12:18 PM Re: Two calls to authenticate [Re: -Fusion-]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I am not the expert. But I wouldn't think so.<br /><br />I also ponder if duplicate authenticate calls (like in the sidebar) create trouble.<br /><br />The sidebar would need it if it's on the left... but then the threads on the right also calls it.<br /><br />On the right, it would be unneeded.<br /><br />Some (admins) get an error at the top of the sidebar when it's on the right about output already being sent. <img src="/forum/images/graemlins/crazy.gif" alt="" /><br /><br />But it's not consistant. <img src="/forum/images/graemlins/tongue.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#245350 - 05/05/03 12:24 PM Re: Two calls to authenticate [Re: Daine]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
I haven't looked at the sidebar thing, but in this case, it should be orphan.<br />There's no additional code or includes between the two calls and the user object gets overwritten.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#245351 - 05/05/03 12:38 PM Re: Two calls to authenticate [Re: -Fusion-]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
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.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#245352 - 05/05/03 01:26 PM Re: Two calls to authenticate [Re: joeuser]
PhotoPost Offline
Hacker

Registered: 02/03/02
Posts: 989
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.
_________________________
[]http://www.danasoft.com/vipersig.jpg[/]
Viper Alley - http://www.viperalley.com
Extreme Fitness - http://www.extremefitness.com[/b]

Top
#245353 - 05/05/03 01:58 PM Re: Two calls to authenticate [Re: gailg]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
That's true....<br /><br />But maybe the info that the sidebar needs should be added into the Authenticate function of ubbt.inc.php.<br /><br />Although if there's no problem with calling it twice, then it can't hurt. <br /><br />I've asked Rick's opinion on calling it twice.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#245354 - 05/06/03 01:22 AM Re: Two calls to authenticate [Re: Daine]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
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).<br /><br />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...
_________________________
Da LAN Tech

Threads Dev Moderator

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks