Skip to:

Opened 8 years ago

Closed 8 years ago

#691 closed enhancement (fixed)


Reported by: fel64 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Back-end Keywords:


Is there such a function? If not, can it be added? Although it's a simple query to get the usermeta value, it would be nice to have a wrapper for it, especially if it works with the cache. I don't understand how the cache works and have trouble following the existing meta functions, otherwise I would have tried to write something myself.

Change History (4)

#1 @mdawaffe
8 years ago

All usermeta data are appended to the user objects you get from bb_get_user() (and are cached).


$user = bb_get_user( 3 );
echo $user->topics_replied; // or whatever meta_key you want.

Knowing that, if you still need a bb_get_usermeta() function, can you explain what you need it for?

#2 @fel64
8 years ago

Nope. :) This is better, thank you.

It's updated, too, isn't it, when bb_add_usermeta is called?

#3 @mdawaffe
8 years ago

Yes - the cache is updated. Any objects you've got hanging around previously created by bb_get_user() are not automatically updated; those are real variables, not references.

And actually, I think convenience functions will be useful.

#4 @mdawaffe
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [904]) bb_get_usermeta(), bb_get_topicmeta(). Bothe require meta_key. Fixes #691

Note: See TracTickets for help on using tickets.