/**
	 * @param string $connection
	 */
	public static function setConnection($connection) {
		self::$connection = $connection;
	}
Esempio n. 2
0
	/**
	 * @param string $username
	 * @return bool|int
	 */
	private static function check_refferer($username) {
		require_once(LIB_DIR . DS . 'class.phpbb_account.php');
		require_once(LIB_DIR . DS . 'class.phpbb_profile_fields_data.php');

		$phpbb_account = phpbb_account::getByName($username);
		if($phpbb_account) {
			$phpbb_special_fields = phpbb_profile_fields_data::get_by_id($phpbb_account[0]["user_id"]);
			if($phpbb_special_fields[0]["pf_werb_einen_freund"]) {
				$rec_id = auth_account::get_id(mb_strtolower($phpbb_special_fields[0]["pf_werb_einen_freund"]));
				if($rec_id)
					return $rec_id;
			}
		}

		// Default Value
		return 0;
	}