summaryrefslogtreecommitdiff
path: root/demos/providers/protected/pages/Home.php
diff options
context:
space:
mode:
authorjrags <>2006-09-21 00:57:53 +0000
committerjrags <>2006-09-21 00:57:53 +0000
commitb6e12bedc51b56cf0f1a5930e69a4c377cd3dfe5 (patch)
tree15931a9902b97d31fb4a4788634c222587c52632 /demos/providers/protected/pages/Home.php
parent5da182335ceec1c8ad68047217a33375897f1c1d (diff)
Added providers demo, sqlmembershipprovider sqlroleprovider both load via modules now, but are not totaly functional yet. TLogin* controls created but not functional yet.
Diffstat (limited to 'demos/providers/protected/pages/Home.php')
-rw-r--r--demos/providers/protected/pages/Home.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/demos/providers/protected/pages/Home.php b/demos/providers/protected/pages/Home.php
new file mode 100644
index 00000000..bbcbc20b
--- /dev/null
+++ b/demos/providers/protected/pages/Home.php
@@ -0,0 +1,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);
+ }
+}
+?> \ No newline at end of file