Exemplo n.º 1
0
<?php
/**
 * Server file for pap alert
 */

require_once 'bootstrap.php';

$userName = addslashes($_REQUEST['u']);
$password = addslashes($_REQUEST['p']);


$papAlert = new Pap_Alert_Data();
$papAlert->authenticate($userName, $password);
$papAlert->getNotification();
?>
	private function loginFromSession($session){
		Gpf_Session::create(null, $session);
		$papAlertData = new Pap_Alert_Data();
		$papAlertData->computeTimeOffset();

		$this->user = new Pap_Common_User();
		try {
			$this->user->setId(Gpf_Session::getAuthUser()->getPapUserId());
		} catch (Exception $e) {
			throw new Gpf_Rpc_SessionExpiredException();
		}
		$this->user->load();
		$this->initializeApplication();
	}