Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-15T01:36:25-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15562 2011-11-15T01:36:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=53001#p53001 <![CDATA[Re: setting a membership ID]]>

Statistics: Posted by Cristián Lávaque — November 15th, 2011, 1:36 am


]]>
2011-11-13T17:20:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52938#p52938 <![CDATA[Re: setting a membership ID]]> Statistics: Posted by plumber — November 13th, 2011, 5:20 pm


]]>
2011-11-12T15:47:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52894#p52894 <![CDATA[Re: setting a membership ID]]>
To hide it from the registration form you can use CSS. viewtopic.php?f=4&t=14706

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — November 12th, 2011, 3:47 pm


]]>
2011-11-12T15:27:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52891#p52891 <![CDATA[Re: setting a membership ID]]> Statistics: Posted by plumber — November 12th, 2011, 3:27 pm


]]>
2011-11-12T15:18:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52884#p52884 <![CDATA[Re: setting a membership ID]]> WP Admin -> s2Member -> General Options -> Registration/Profile

Statistics: Posted by Cristián Lávaque — November 12th, 2011, 3:18 pm


]]>
2011-11-12T04:01:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52868#p52868 <![CDATA[Re: setting a membership ID]]> Statistics: Posted by plumber — November 12th, 2011, 4:01 am


]]>
2011-11-12T02:22:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52847#p52847 <![CDATA[Re: setting a membership ID]]>

Statistics: Posted by Cristián Lávaque — November 12th, 2011, 2:22 am


]]>
2011-11-11T08:12:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52770#p52770 <![CDATA[Re: setting a membership ID]]>
It works !
Thumbs Up for s2 Member coding & support !

Statistics: Posted by ecowebdesign — November 11th, 2011, 8:12 am


]]>
2011-11-11T01:52:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52755#p52755 <![CDATA[Re: setting a membership ID]]> WP Admin -> s2Member -> PayPal Buttons -> Shortcode Attributes -> custom

Then in the custom New User email you can do something like GR-%%cv1%%-%%user_id%%. WP Admin -> s2Member -> General Options -> Email Configuration -> New User

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — November 11th, 2011, 1:52 am


]]>
2011-11-09T08:20:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=52635#p52635 <![CDATA[Re: setting a membership ID]]> I am using the following code to display Member ID when users logs in:

<?php
global $userdata;
get_currentuserinfo();


echo 'MEMBER ID: GR-'. date('dmy', $regunixDate) ;
echo '-'. S2MEMBER_CURRENT_USER_ID;
?>

It is a junction form registration date & ID.
Which output like this: MEMBER ID: GR-150211-1

I would like to send this Member ID in the user registration e-mail, as i am doing with %user_login% or %user_pass%.

How it is possible ?

Statistics: Posted by ecowebdesign — November 9th, 2011, 8:20 am


]]>
2011-10-21T07:40:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48487#p48487 <![CDATA[Re: setting a membership ID]]> Statistics: Posted by Eduan — October 21st, 2011, 7:40 am


]]>
2011-10-21T04:11:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48472#p48472 <![CDATA[Re: setting a membership ID]]>
I've settled on a membership number of the format YYYYMMDDD-nnnnnn

I get the YYMMDD bit from the registration date of the user and the nnnnnn bit from the unique userid assigned by wordpress.

So a wee bit of PHP using strtotime and date to format the registration timestamp to pick out the YYYYMMDD part and a wee function to pad out the nnnnnn part with the correct number of leading zeroes.

I'm using the Headway theme which allows you to add PHP/HTML 'leafs' (Headway terminology not mine) so the php code can be dropped in without having to use any php exec plugins.

All of that is displayed dynamically to a logged in user only using s2If shortcode conditionals

What I now need to do is see if I can export these dynamically created membership numbers for card printing purposes. I've installed amr-users which is quite good at giving a gui type interface for user metadata in the admin dashboard - this includes all of the s2member stuff too and as it also allows export to CSV etc it is ideal for our purposes. I can set up a list with name, address, postcode, email etc, export it and then do a mailmerge for the cards.

the only snag I have is I can't (yet) see a way of applying the formatting for a membership number as used dynamically on the site. Might be able to do something in libreoffice excel though

it would all be so much simpler if there was a separate membership number field in s2members...

anyway - thanks to those who have offered advice and I hope this is maybe helpful to someone

I've included the code I used to strip out and format the data. Maybe someone will find it handy - or at least it might save a trip to the php manual...

Code:
<?php

function number_pad($number,$n) {
return str_pad((int) $number,$n,"0",STR_PAD_LEFT);
}

?>
<?php
echo "Membership number: ";
echo date("Ymd", strtotime(get_userdata(get_current_user_id( ))->user_registered)); ?>

<?php
    global $userdata;
    get_currentuserinfo();
    echo "-" .  number_pad( $userdata->ID,6 );
?>

Statistics: Posted by plumber — October 21st, 2011, 4:11 am


]]>
2011-10-20T02:12:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48370#p48370 <![CDATA[Re: setting a membership ID]]>
That's my current line of thinking

Statistics: Posted by plumber — October 20th, 2011, 2:12 am


]]>
2011-10-19T21:42:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48362#p48362 <![CDATA[Re: setting a membership ID]]> codex.wordpress.org/Function_Reference/get_currentuserinfo

Statistics: Posted by Bruce C — October 19th, 2011, 9:42 pm


]]>
2011-10-19T08:12:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48324#p48324 <![CDATA[Re: setting a membership ID]]>
Maybe I need to look at another plugin which could add custom fields at a user level

Statistics: Posted by plumber — October 19th, 2011, 8:12 am


]]>
2011-10-18T12:48:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48286#p48286 <![CDATA[Re: setting a membership ID]]>
I'm looking to set a membership number for every member. We have some members who will sign up with paypal but have a lot who will need to be imported using the import facility and will probably always pay by cash or cheque. My main use of s2members to start with will be a consolidated membership database rather than a means of controlling access to different levels of content - although that is on the roadmap. So I need a unique identifier that will survive membership expiry - the subscriber ID from paypal blanks on expiry. We need to send out a membership card as that is in the club constitution

I couldn't find a way of using a custom field to set up a system generated or pseudo system generated membership ID. Seems such a simple thing to want but I can't find a way of doing it - so far.

Thanks for your reply though

Statistics: Posted by plumber — October 18th, 2011, 12:48 pm


]]>
2011-10-17T18:37:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48219#p48219 <![CDATA[Re: setting a membership ID]]>
If so then try this post and see if it helps: viewtopic.php?f=4&t=15492&p=45273&hilit=member+id#p45273

P.S. Remember to report back.

Statistics: Posted by Eduan — October 17th, 2011, 6:37 pm


]]>
2011-10-17T18:20:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15562&p=48216#p48216 <![CDATA[setting a membership ID]]>
I'm using s2members more as a membership management tool than an access tool (if you know what I mean) and I need to assign membership numbers as one of the things we need to do is post people out a membership card (it's in the constitution...)

We have lots of people who pay using cheques or cash - rather than paypal - and also quite a lot of people who have paid using paypal in the past - but not via our new site. So the problem I have is trying to coerce everyone on to the site an onto paypal (eventually).

We also have a complex membership payment structure that makes recurring payments difficult. The best I can come up with is making everything Buy Now and forcing expiries after one year. The problem this gives me is that the subscriber ID disappears once the member level reverts to 0 (Free Subscriber)

anyone got any ideas of how I can assign a membership number which will persist through expiries and renewals? Hope that's clear and thanks in advance for any advice or assistance

Statistics: Posted by plumber — October 17th, 2011, 6:20 pm


]]>