I’m overriding hook_boot in my drupal 7.10 project, and trying to load a user account from it. I get the following error.
Call to undefined function entity_load()
Any ideas why that might be happening? Here is my code.
function appcore_boot() {
drupal_load('module', 'user');
$account = user_load(array('uid' => 1));
}
If you can’t move it into
hook_initthen an easy way to ensurecommon.incis loaded is by calling:Just place this inside your
hook_bootbefore you calluser_load. You might not even needDRUPAL_BOOTSTRAP_FULLto getcommon.incloaded, but that is what I tested it against.What pointed me here is the documentation for current_path which says: