Creating new access_control

I have a newly created table called elgg_addressdetails and it have the various details of user in different columns and it have also a column called access_id, I want to display the address details to each users based on the access_id in the current table (like wise in annotation, entities, metadata and so on ) Can anybody please suggest how can I achieve it, What i need to do, to function the elgg_addressdetails table works with its own access_id.

Please suggest as I am out of my head by spending all the time for this :)

  • Don't create new tables if you don't know what you are doing. Use annotations, which are already access controlled.

  • @Ismayil

     

    Thanks , I am okay with other things, but don't know how to access controlled the new table created. Also can you help me on logic how to use annotations in this case to store some values of address details.

     

  • You can serialise annotation values, or json encode them.

    access_id on it's own is not helpful, you would have to store the owner_guid as well. But there is no public API for building an SQL query, you could use the internal _elgg_get_access_sql_query().