Vergleich inc/datahandlers/login.php - 1.8.1 - 1.8.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 41Zeile 41
	 */
public $login_data = array();


	 */
public $login_data = array();


 
	/**
* @var bool
*/

	public $captcha_verified = true;

	public $captcha_verified = true;

	





/**
* @var bool|captcha
*/

	private $captcha = false;


	private $captcha = false;


 
	/**
* @var int
*/

	public $username_method = null;


	public $username_method = null;


 
	/**
* @param int $check_captcha
*/

	function verify_attempts($check_captcha = 0)
{
global $db, $mybb;

	function verify_attempts($check_captcha = 0)
{
global $db, $mybb;

Zeile 67Zeile 79
		}
}


		}
}


 
	/**
* @return bool
*/

	function verify_captcha()
{
global $db, $mybb;

	function verify_captcha()
{
global $db, $mybb;

Zeile 106Zeile 121
		}
}


		}
}


 
	/**
* @return bool
*/

	function verify_username()
{
$this->get_login_data();

if(!$this->login_data['uid'])

	function verify_username()
{
$this->get_login_data();

if(!$this->login_data['uid'])

		{
$this->invalid_combination();
return false;
}
}



		{
$this->invalid_combination();
return false;
}

return true;
}





 
	/**
* @param bool $strict
*
* @return bool
*/

	function verify_password($strict = true)
{

	function verify_password($strict = true)
{

		global $db, $mybb;

$this->get_login_data();

		global $db, $mybb, $plugins;

$this->get_login_data();


if(empty($this->login_data['username']))
{


if(empty($this->login_data['username']))
{

Zeile 129Zeile 154
			$this->invalid_combination();
return false;
}

			$this->invalid_combination();
return false;
}

 

$args = array(
'this' => &$this,
'strict' => &$strict,
);

$plugins->run_hooks('datahandler_login_verify_password_start', $args);


$user = &$this->data;



$user = &$this->data;


Zeile 169Zeile 201

$salted_password = md5(md5($this->login_data['salt']).$password);



$salted_password = md5(md5($this->login_data['salt']).$password);


		if($salted_password != $this->login_data['password'])



		$plugins->run_hooks('datahandler_login_verify_password_end', $args);

if($salted_password !== $this->login_data['password'])

		{
$this->invalid_combination(true);
return false;
}

		{
$this->invalid_combination(true);
return false;
}

 

return true;

	}


	}


 
	/**
* @param bool $show_login_attempts
*/

	function invalid_combination($show_login_attempts = false)
{
global $db, $lang, $mybb;

	function invalid_combination($show_login_attempts = false)
{
global $db, $lang, $mybb;





		// Don't show an error when the captcha was wrong!
if(!$this->captcha_verified)
{

		// Don't show an error when the captcha was wrong!
if(!$this->captcha_verified)
{

Zeile 188Zeile 227

$login_text = '';
if($show_login_attempts)


$login_text = '';
if($show_login_attempts)

		{

		{

			if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)
{
$logins = login_attempt_check(false) + 1;

			if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)
{
$logins = login_attempt_check(false) + 1;

Zeile 229Zeile 268
		$this->login_data = get_user_by_username($user['username'], $options);
}


		$this->login_data = get_user_by_username($user['username'], $options);
}


 
	/**
* @return bool
*/

	function validate_login()
{
global $plugins, $mybb;

	function validate_login()
{
global $plugins, $mybb;

Zeile 237Zeile 279

$plugins->run_hooks('datahandler_login_validate_start', $this);



$plugins->run_hooks('datahandler_login_validate_start', $this);


		$this->verify_attempts($mybb->settings['captchaimage']);




		if(!defined('IN_ADMINCP'))
{
$this->verify_attempts($mybb->settings['captchaimage']);
}


if(array_key_exists('username', $user))
{


if(array_key_exists('username', $user))
{

Zeile 260Zeile 305
		return true;
}


		return true;
}


 
	/**
* @return bool true
*/

	function complete_login()
{
global $plugins, $db, $mybb, $session;

	function complete_login()
{
global $plugins, $db, $mybb, $session;