I have inherited an EE site and am working on adding new features to a custom module built by the previous maintainer. Although I have made a lot of progress, I am becoming increasingly frustrated by the small amount of documentation I have been able to find regarding access to the EE core. For example, I am currently doing some work which involves checking for the existence of a member, and creating it automatically from the CP if it doesn’t already exist. I have managed to find a couple of examples in this forum which go part way to acheiving my goal but nothing in the User Guide which would help at all.
Is there, anywhere, a reference to ‘all’ functions available in EE? For instance, I would like to follow the advice “Take a look at the member model.” given in - this post. Where would I do this?
Thanks in advance for any pointers…
Martin
The member model is in /system/expressionengine/models/member_model.php. You will want to look at the create_member method.
Psuedo code:
APPPATH.'models/member_model.php';
$member_model = new Member_model;
//member_data can only contain data to be inserted into the exp_members table.
$member_data = array(...);
//the second param being TRUE tells it to create an empty record in exp_member_data and associate it with the newly created member
$member_model->create_member($member_data, TRUE);As far as a reference to all functions there is not one. Browsing the files in the system/expressionengine directory/subdirectories is the only way to go to get a full view of the system.
The member model is in /system/expressionengine/models/member_model.php. You will want to look at the create_member method.
Cheers for that.
As far as a reference to all functions there is not one. Browsing the files in the system/expressionengine directory/subdirectories is the only way to go to get a full view of the system.
I was afraid that would be the case. I have to say that coming from open source systems I find it surprising and very disappointing that a commercial product such as EE is so poorly documented in comparison. Guess I’ll have to revise the time estimate upwards for this project…
Thanks for your help.
Martin
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.