How about the ability to show the membership expiry date on the user's profile page as well as being able to post it in a custom view?
How about the ability to show the membership expiry date on the user's profile page as well as being able to post it in a custom view?
Comments
Comment #1
boobaaGood idea, and it is not too difficult to implement.
Comment #2
mdowsett commentedcool! I thought Views integration may require a lot of work. I'm looking forward to seeing that.
Comment #3
boobaaWell, do you want to have complete Views integration, or just a simple field added onto the user's profile page? ;)
Comment #4
mdowsett commentedViews integration....so you can show a member's expiry date in a View Table
Comment #5
boobaaThe just released membership-5.x-1.1 has views support in it.
Comment #6
mdowsett commentedI upgraded my test site OK, it shows the "Membership Expires" field in Views....but now I go to update the live site to the v1.1 of the membership module and it doesn't show that field in the Views creation.
But then again, it doesn't show some other module's fields (signup) so it may be a deeper problem...any ideas? I even tried to create a brand new View and those fields aren't listed to be chosen.
Comment #7
mdowsett commentedNevermind...I disabled and re-enabled the membership module and that fixed it....strange...
Comment #8
mdowsett commentedI'm re-opening this...
I just noticed that the 'Membership Expires' field IS in the View's field listing.....but not in the Views' Filter listing
I'd like to create a View that only has member's with current memberships (ie the membership expires date hasn't passed)
Comment #9
mdowsett commentedI took a stab at adding it to the filters....I'm no coder (at all) so I don't know how to create a patch.
I tried putting this code in the existing views section of the membership.module file:
I didn't get errors so I was proud! :) But it doesn't list the "Membership: Expires" item in the list of available filters.
Can someone review to see if I was close?!
Many thanks.
Comment #10
mdowsett commentedI found a work-around....linking membership processing to a role and then using that role as a filter in the view.
Works nicely and opens the door to other features (auto denied access to site/features as membership expires)
Comment #11
mdowsett commentednow for the opposite...how would I create a Views list of people with an expired membership?
I believe once a user's membership has expired, it reads 'never' as the date and removes them from the Membership role.
#1 I tried using the 'Membership Expires' field is less than 'now'. That showed noone.
#2 I tried using the 'Membership Expires' field equals 'never'. That showed noone.
#3 I tried using the 'Role: Author Role' is 'none of' and selected the Membership role but that showed all users.
I didn't expect the 'Role: Author Role' one to work since it's wording talks about INCLUDING node owners that fit the selected role(s) whereas I want to EXCLUDE users...I don't think I'm using that field right.
It seems to me the best solution would be go get #1 or #2 from above working
Comment #12
boobaaDevelopment of membership.module is being discontinued for now (and you failed to submit a proper patch, anyway). Check Role Expire module which claims to have much better Views integration, and countless other improvements (eg. multiple managed roles). Anyway, sticking with D5 seem to be a bit dull nowadays without stating proper reasons.