MyBB Community Forums

Full Version: Relationship between 'action' and 'do_action'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

Does an 'action' call a 'do_action'?

For example in usercp.php if a user attempts to edit their email address the action is 'email' does the email action call 'do_email' action? What is the relationship between these two?

Thanks a lot!
When the action is 'email', that means we're viewing the change email page. When the action is 'do_email', we're actually changing the email and making the changes to the database.

You'll find this right across MyBB.
That's what I thought, I just don't see how 'email' calls 'do_email'.
In the change email page, there is a hidden field in the form:

<input type="hidden" name="action" value="do_email" />

So when the form submits, $mybb->input['action'] will be "do_email".
Obviously.

Thanks again mate.