public function exists($password = null, $since = null)
	{
		$db = \App::get('db');

		if (empty($db))
		{
			return false;
		}

		$query = "SELECT `passhash` FROM `#__users_password_history` WHERE user_id = " . $db->quote($this->user_id);

		if (!empty($since))
		{
			$query .= " AND invalidated >= " . $db->quote($since);
		}

		$db->setQuery($query);

		$results = $db->loadObjectList();

		if ($results && count($results) > 0)
		{
			foreach ($results as $result)
			{
				$compare = \Hubzero\User\Password::comparePasswords($result->passhash, $password);
				if ($compare)
				{
					return true;
				}
			}
		}

		return false;
	}
public function exists($password = null, $since = null)
	{
		$db = \App::get('db');

		if (empty($db))
		{
			return false;
		}

		$query = "SELECT `passhash` FROM `#__users_password_history` WHERE user_id = " . $db->quote($this->user_id);

		if (!empty($since))
		{
			$query .= " AND invalidated >= " . $db->quote($since);
		}

		$db->setQuery($query);

		$results = $db->loadObjectList();

		if ($results && count($results) > 0)
		{
			foreach ($results as $result)
			{
				$compare = \Hubzero\User\Password::comparePasswords($result->passhash, $password);
				if ($compare)
				{
					return true;
				}
			}
		}

		return false;
	}
public function exists ( $ password = null , $ since = null ) { $ db = \ App :: get ( 'db' ) ; if ( empty ( $ db ) ) { return false ; } $ query = "SELECT `passhash` FROM `#__users_password_history` WHERE user_id = " . $ db -> quote ( $ this -> user_id ) ; if ( ! empty ( $ since ) ) { $ query .= " AND invalidated >= " . $ db -> quote ( $ since ) ; } $ db -> setQuery ( $ query ) ; $ results = $ db -> loadObjectList ( ) ; if ( $ results && count ( $ results ) > 0 ) { foreach ( $ results as $ result ) { $ compare = \ Hubzero \ User \ Password :: comparePasswords ( $ result -> passhash , $ password ) ; if ( $ compare ) { return true ; } } } return false ; }
Check if a password exists for a user

@param   string  $password
@param   string  $since
@return  boolean
Check if a password exists for a user