summaryrefslogtreecommitdiff
path: root/demos/providers/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'demos/providers/protected/pages')
-rw-r--r--demos/providers/protected/pages/Home.page4
-rw-r--r--demos/providers/protected/pages/Home.php27
2 files changed, 31 insertions, 0 deletions
diff --git a/demos/providers/protected/pages/Home.page b/demos/providers/protected/pages/Home.page
new file mode 100644
index 00000000..10069478
--- /dev/null
+++ b/demos/providers/protected/pages/Home.page
@@ -0,0 +1,4 @@
+<h1>Welcome to Prado!</h1>
+<com:TForm>
+ <com:TLogin ID="LoginCtrl" MembershipProvider="SqlMembershipProvider"/>
+</com:TForm> \ No newline at end of file
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