<?php
	require_once( $GLOBALS["site_root"]."/includes/pages/BackendPopup.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/models/MyMember.inc.php" );

	class AdminUserGotoPage extends BackendPopup {
		public function __construct( $id = "AdminUserEditPage" , $parent = null ) {
			parent::__construct( $id , $parent );
			if (!AdminUserModel::isAdminLoggedIn()) return;
		}

		public function handleEvents() {
			if (!isset( $this->aG["user_id"] )) return parent::handleEvents();
			if (!isset( $this->aG["url"] )) return parent::handleEvents();
			$mym = new MyUserModel();
			$mym->loginUser( $this->aG["user_id"] );
			FNTH_redirect( $this->aG["url"] );
			return parent::handleEvents();
		}

		public function render() {
			return "unavailable";
		}
	}

?>
