s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Using Current User Registration Days in a formula (1 post)

  1. scottgoldsmith
    Posted 2 years ago #

    I seem to be having issues using Current User RegistrationDays in a formula. I've been able to use other S2Get User fields in formulas on my pages. Posting [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /] displays the proper number of days. However, I'd like to get the total weeks that the user has been registered and be able to use this as a variable.

    Here's an example of my code that doesn't seem to be working. I've tried playing with the structure of the [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /] request to no avail.

    var User_days = [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /];
    var User_weeks = (User_days/7);



Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic