summaryrefslogtreecommitdiff
path: root/demos/providers/protected/pages/Home.php
blob: bbcbc20b0e7d506ab40ae02d3590b2919d41678f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
class Home extends TPage
{
	public function OnLoad($param)
	{
		Prado::using('System.Util.TVarDumper');
		Prado::using('System.Web.Security.TSqlMembershipProvider');
		Prado::using('System.Configuration.TProtectedConfiguration');
		//		TRoles::CreateRole('test');
		//		TMembership::ValidateUser('test','test');
		//		echo TVarDumper::dump(TProtectedConfiguration::getDefaultProvider(),10,true);
		//		echo TVarDumper::dump($this->Application->getModule('ProtectedConfiguration'),10,true);


		// Access by provider id
		//		$MembershipProvider = $this->Application->getModule('MembershipProvider')->getProvider('SqlMembershipProvider');
		// or just get the default provider
		$MembershipProvider = $this->Application->getModule('MembershipProvider')->Provider;
		//		$RoleProvider = $this->Application->getModule('RoleProvider')->Provider;
		/* @VAR $MembershipProvider TSqlMembershipProvider */
		/* @VAR $RoleProvider TSqlRoleProvider */
		echo TVarDumper::dump($MembershipProvider,10,true);
		echo TVarDumper::dump($MembershipProvider->getMembershipUser('testUser'),10,true);
		//		echo TVarDumper::dump($RoleProvider,10,true);
	}
}
?>