Manipulate user profile data from external system

I'm a reasonably experienced PHP dev, but much less certain about elgg. 

 

There are two integration I want to try:

1.  Have an external system push user profile data to a corresponding user profile in Elgg. I would have to maintain a table of Elgg entity ids so I know which user to update. Any hints about where in Elgg to write my code?  The code would have to be a rest service or some other interface that can receive and process the data.  I don't think manipulating the db directly is a good idea. 

OR

2.  When a user has to update their profile data, have Elgg redirect them to our external system, and have Elgg read from that external system whenever it needs to reference that data. 

 

Can an an experienced Elgg Dev suggest where to start with either of these?  Any other opinions are welcome too.  I can handle the PHP part of this, but just need to understand the Elgg framework and model better.

It's my strong preference to avoid using iframes for any of this.  Would like to avoid this sort of ui trickery.

Thank you.

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