How list all entitie's metadata

By Simone

I've a plugin that add particular metadata to an user, each with particular name.

For example I retrieve a $user via guid, than I set to it a metadata via a $parameter and assign a $foo value:

 

$user->{$param.'Face'} = $foo;

----- or -----

$user->{$param.'Foot'} = $foo;

 

How can i display all $user metadata?

 

Secondly, but not directly correlated:

it's better use multiple metadata or assign a an to unique metadata?

example:

 

$user->{'Facebook'.$auth} = $id;

$user->{'Google'.$auth} = $id;

 

------ OR --------

 

$user->auth = array('Facebook' => $id1, 'Google' => $id2);

 

 

Thanks for reading

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking