latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

reset s2member_login_counter

Home Forums Community Forum reset s2member_login_counter

This topic contains 6 replies, has 2 voices. Last updated by  Eduan 3 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 19th, 2013 at 8:49 am #45162
Frank Bens
Username: Frankbe

Is there anyway to reset s2member_login_counter to 0?
Thanks

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Wednesday Mar 20th, 2013 at 8:43 pm #45269
Eduan
Username: Eduan
Moderator

Hello Frank,

I’m not aware of a way to do this. I’ll ask Jason and see if he has anything to say. :)

– Eduan

Posted: Thursday Mar 21st, 2013 at 9:20 am #45335
Eduan
Username: Eduan
Moderator

Hello Frank, Jason answered with this:

update_user_option ($user_id, 's2member_login_counter', 0);

This would be inside PHP tags of course. :)

Posted: Thursday Mar 21st, 2013 at 1:31 pm #45364
Frank Bens
Username: Frankbe

Hi Eduan,
That helped me a lot.
Can I use the counter variable in a shortcode?
Something like this:
[s2Get constant="s2member_login_counter" /]

Posted: Thursday Mar 21st, 2013 at 6:41 pm #45413
Eduan
Username: Eduan
Moderator

There is a way to output it in a shortcode actually:

[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN_COUNTER" /]

Sorry I didn’t notice that before. I found it under Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants.

– Eduan

Posted: Thursday Mar 21st, 2013 at 6:54 pm #45415
Frank Bens
Username: Frankbe

Awesome!
Thank you very much!

Posted: Friday Mar 22nd, 2013 at 10:50 am #45493
Eduan
Username: Eduan
Moderator

No problem. :)

Viewing 6 replies - 1 through 6 (of 6 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.