12.x: set group expiration date at users_usergroups table when user selects the group at registration time OR through PluginSubscribeGroup OR through PluginMemberlist
- Status
- Closed
- Subject
- 12.x: set group expiration date at users_usergroups table when user selects the group at registration time OR through PluginSubscribeGroup OR through PluginMemberlist
- Version
- 12.x
- Category
- Conflict of two features (each works well independently)
- Consistency
- Error
- Feature
- Group
User Administration (Registration, Login & Banning) - Resolution status
- Won't Fix
- Submitted by
- Xavier de Pedro
- Lastmod by
- Xavier de Pedro
- Rating
- Related-to
- Description
When you set some expiry time for a group membership (through the admin groups interface), this information is stored in mysql table users_usergroups, and this is taken into account when you use PluginMemberPayment.
However, in other cases of letting a user join a group which has some expiry date set, that information (expiry date) is not stored at mysql table users_usergroups as expected.
Reproduced here:
http://xavi-9794-5946.show.tikiwiki.org/tiki-index.php?page=HomePage
u: admin
p: 12345You can also test with a few users already created:
u: foo1
p: 12345or
u: user1
p: user1Cases:
a) Through usual Registration
if you set some group to be selected at registration time
You can register a new user to test case (a), and select either Group1 or Group2 at registration time (both have expiry date 2 days later):
http://xavi-9794-5946.show.tikiwiki.org/tiki-register.phpb) Through Plugin subscribegroup
if the user clicks at PluginSubscribeGroup (with perms and site config set up appropriately),
http://xavi-9794-5946.show.tikiwiki.org/tiki-index.php?page=HomePage#Plugin_subscribegroupc) Through Plugin MemberList
if the user selects to join him/herself thorugh PluginMemberList
(with perms and site config set up appropriately), or the admin join a user to that group
http://xavi-9794-5946.show.tikiwiki.org/tiki-index.php?page=HomePage#PluginMemberListHowever, looking at the user through tiki-assignuser.php?assign_user=foo , the right expiry information is shown.
http://xavi-9794-5946.show.tikiwiki.org/tiki-assignuser.php?assign_user=foo1But if you use PluginGroupExpiry (which looks for that date at table users_usergroups) no date is found and it reports back that the group membership never expires.
http://xavi-9794-5946.show.tikiwiki.org/tiki-index.php?page=HomePage#PluginGroupExpiry_infoIn addition, it seems that someone already noticed that type of issue, and this comment can be found in lib/userslib.php > function get_extend_until_info:
Copy to clipboard(...) function get_extend_until_info($user, $group, $periods = 1) { //use these functions to get current expiry dates for existing members - they are calculated in some cases //so just grabbing the "expire" field from the users_usergroups table doesn't always work (...)
Update :
- this issue seems to be fixed in Tiki 15.x (as of r58705, at least). The 3 use cases work as expected (nice!). The extra code in 15.x would need to be backported to 12.x, I guess.
- Assign user to groups has got a regression in 15.x: you cannot see (nor even edit) the group expiry date through the standard user administration UI in 15.x: when you click in "add or remove from a group" in 15.x, you are sent in a modal to this type of url:
tiki-ajax_services.php?controller=user&action=manage_groups&checked=foo1&all_groups%5B0%5D=Admins&all_groups%5B1%5D=Anonymous&all_groups%5B2%5D=Group1&all_groups%5B3%5D=Group2&all_groups%5B4%5D=Registered&offset=0&sort_mode=login_asc&numrows=25&modal=1
and no expiry information is shown.
While in Tiki12, you are sent to:
tiki-assignuser.php?assign_user=foo1
This has been added as a new bug report, since it's another issue (regression):
item5953
- Workaround
- use Tiki15 where this issue was fixed.
- Importance
- 8
- Easy to solve?
- 8
- Priority
- 64
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 5946
- Created
- Thursday 26 May, 2016 10:45:44 UTC
by Xavier de Pedro - LastModif
- Sunday 18 June, 2017 23:04:28 UTC