Jump to content


Photo

SessionLoginThrottle early return?


  • Please log in to reply
1 reply to this topic

#1 netcarver

netcarver

    Sr. Member

  • Members
  • PipPipPipPip
  • 428 posts
  • 342

  • LocationUK

Posted 16 March 2012 - 07:32 PM

Are my old eyes deceiving me or is there a spurious return at line 47 in wire/modules/SessionLoginThrottle.module -- or am I totally misunderstanding how this method works :blink: ?

public function sessionAllowLogin($event) {
	return;
	$name = $event->arguments[0];
	...

Steve ☧

#2 ryan

ryan

    Hero Member

  • Administrators
  • 5,985 posts
  • 3386

  • LocationAtlanta, GA

Posted 17 March 2012 - 07:34 AM

Uhh, yeah new PHP technique, didn't you know? Return early and you don't have to execute any of the code below--very efficient. Leads to faster execution time. O0

Okay in all seriousness, it looks like I put that there for debugging at some point and neglected to remove it. Thank you for finding it. The problem is, I have no idea how long it has been that way, so I'm going to do a little hunting around GitHub to figure it out. If this has been disabled for a long time, I'll need to give it some good testing before committing the fix back. Luckily, this particular module is more of an extra than a necessity, but a good thing to have nevertheless. Thanks again for finding it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users