Moneer

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • Moneer replied on the discussion topic help in create user meta data when the user is created
    Can any one give me a code example of creating meta data,for the user, when a save or create event happen, and give me another example of how to get all user entities using elgg_get_entities. I tried to get the entites using... view reply
  • Moneer added a new discussion topic help in create user meta data when the user is created in the group Plugin Development
     Hi, I'm trying to create a new user meta data for the created user object when the create user event is triggered the code is as following: <?phpfunction organization_user_init(){register_elgg_event_handler('create', 'user',...
    • @T ummhmm:
      guy's gotta do that dbg first to see what values are in there..
      then we proceed from there...
      btw the ->save will be outside the event handler ;)

       

    • Can any one give me a code example of creating meta data,for the user, when a save or create event happen, and give me another example of how to get all user entities using elgg_get_entities. I tried to get the entites using elgg_get_entities('user','user') in 1.8.0.1 but it give all the more rows than the number of users i have, and it give me also the identical result when i use elgg_get_entities('object','page'). That is will make me crazy. I don't know wether i didn't understand how to use these functions or there is a bug in them. Please help urgently.

      Thanks

    • Have you actually tried these suggestions ?
       * check to see if you are actually getting the right guid.
       * try a dbg dump @ create_metadata(...) code
      you should spend effort in debugging yr own code rather than looking for
      'example code' b/c no one has coded the exact 'example' code u r trying..

      here's sample metadata create code from working plugin :-
      // create_metadata($entity_guid, $name, $value, $value_type, $owner_guid, $access_id = ACCESS_PRIVATE, $allow_multiple = false)
          if ( create_metadata($Guid, "DPay" . $metaname, $metaval,'', 0, ACCESS_PUBLIC) )
          {
              . . .

       

  • Moneer joined the group Plugin Development