Plugin Author
anmari
(@anmari)
Hi Roysmyth,
No, nothing changed in terms of formatting or field names. All that was added was ability to exclude meta keys from the find fields. No changes to other functioning.
The calling function is still
if function_exists('ausers_format_'.$column_name))
and in my setup s2member stores it’s meta with the prefix. in my case beta_s2member_last_login_time
so it would always have wanted whatever your sites prefix was.
Did you change prefixes? change sites ?
The only other way you might have not been using a prefix would be if you were using code like the example
http://wpusersplugin.com/related-plugins/amr-user-plugin-add-ons/amr-users-plus-s2-member/
were it is checking partial strings to avoid having to worry about the prefix eg:
stristr($i,'s2member_paid_registration_times'))
Plugin Author
anmari
(@anmari)
Another thought that occurred to me. Perhaps S2member changed something at some point? You would then end up with fields both with and without prefix and so without might have worked at some stage and then would not work for newer members. I tried googling – saw this comment
s2member encodes certain metafields with the db-prefix and these are different between the two sites and therefore are not reading each other properly from http://premium.wpmudev.org/forums/topic/user-synchronization-plugin-does-not-syncronize-profile-information-from-s2member-or-user-metadata
Hi,
Thanks for the quick responses.
No, didn’t change sites or make any db changes. Just did the amr users plugin update and suddenly the reports had unix time stamps instead of nicely formatted dates.
Can’t be a change such as you suggest in your second response. The s2member plugin wasn’t changed. The dates for all 375 members in the database, which were added over the period June to now, all format the same way and all suddenly require the table prefix.
I was surprised when I originally added the formatting routines that a prefix wasn’t required and made a comment in the code to remind myself.
Seems like a mystery but now it works again. I wonder if others will experience the same problem,
Plugin Author
anmari
(@anmari)
I haven’t had anyone else mention anything yet… we will see!
In light of the above discussion, I find the directions in this documentation page confusing:
In http://wpusersplugin.com/2823/formatting-and-pluggable-functions/,
Formatting a Field with database table prefix built into name
strip the database prefix out of the field/function name
eg1: NOT
ausers_format_wp_capabilities_secondrole (), but rather:
ausers_format_capabilities_secondrole ()
eg2: NOT
ausers_format_wp_s2member_custom_fields-yourspecialfield (), but rather:
ausers_format_s2member_custom_fields_yourspecialfield ()
Plugin Author
anmari
(@anmari)
You’re right, I’ll have to look into it again.something is not as it used to be.