21307 Posts in 5737 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 503 Views |
-
[SOLVED] Set Access to "Logged-in users" in code

28 September 2009 at 4:10pm Last edited: 28 September 2009 4:15pm
Hiya,
I'm creating a registration module. The "MyAccount" page obvoiusly needs to be set to be viewable by "Logged-in users" by default when installed.
Is there a way to do this in my requireDefaultRecords method? I'm building the default page like so:
$myAccount = new MyAccountPage();
$myAccount->Title = "My Account";
$myAccount->URLSegment = "my-account";
$myAccount->Status = "Published";
$myAccount->write();
$myAccount->publish("Stage", "Live");Any ideas?
Aaron
-
Re: [SOLVED] Set Access to "Logged-in users" in code

28 September 2009 at 4:15pm
Note to self - Check page database table structure
$myAccount->CanViewType = "LoggedInUsers";
This did exactly what I wanted.
Aaron
| 503 Views | ||
|
Page:
1
|
Go to Top |

