Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




auto expire subscribers after a certain number of days

UserPost

11:47 am
August 15, 2011


davetwizzlebird

Member

posts 2

1

Hi, already posted this over at wordpress.org but didn't know if it was better to post here. I understand role scoper has the ability to auto expire user accounts but I can't quite figure out how to implement it. I would like my subscriber level accounts to expire after 30 days, is this possible and if so how!
thanks

7:46 am
August 17, 2011


Kevin

Admin

posts 2503

2

That's a good idea, but not currently supported. Roles can be assigned for a specific duration. If you you are able to troll through the code for usage examples (those invoked by the RS bulk admin forms), it would be possible to write your own code to automate duration-limited role assignments via calls to ScoperRoleAssigner::assign_roles() :

function assign_roles($scope, $src_or_tx_name, $item_id, $roles, $role_basis = ROLE_BASIS_USER, $args = array() ) {

    $defaults = array( 'implicit_removal' => false, 'is_auto_insertion' => false, 'force_flush' => false, 
'set_role_duration' => ", 'set_content_date_limits' => " );

…but I don't have time to further document or consult on that right now.

8:34 am
August 17, 2011


davetwizzlebird

Member

posts 2

3

I'm sure I'm being stupid here but what is the difference between "Roles can be asigned for a specific duration" and what I'm trying to do, have I misunderstood something here?

3:20 pm
August 17, 2011


Kevin

Admin

posts 2503

4

Current functionality supports manual assignment of a role with explicit start and/or end date specification. You're asking for automatic assignment (upon registration) of a role with dynamically generated end date of "now + 30 days".


About the Agapetry forum

Currently Online:

17 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1245

Posts: 5653

Members:

There are 1255 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin