Yes, but you’d have to get your hands dirty with a bit of code.
There’s a few ways you could do this, but here’s some pointers:
- Start by creating an appropriate hook in your theme’s
functions.php
file, or as a new plugin. You’d probably want to use the user_register
hook.
- Use
CTXPS_Queries::add_membership_with_expiration()
to automatically register new users to a specified group with a specified expiration date (this is located in contexture-page-security/core/model_queries.php
.
Here’s some code right off the top of my head that may do the trick (totally untested) – you’ll need to check it to ensure the correct group id and whatnot suit your needs, of course.
add_action('user_register','autoregister_user',10,1);
function autoregister_user($user_id){
$group_id = 3;
$expires = strtotime(date("Y-m-d")) . " +2 week");
$expires = date("Y-m-d",$expires);
CTXPS_Queries::add_membership_with_expiration($user_id,$group_id,$expires);
}
Theoretically, the above will automatically enroll any newly registered user in the group with id 3, and that membership will expire two weeks from the day they registered.
Hope this helps.