/** * Overrides \RestfulEntityBase::viewEntity(). * * Always return the current user. */ public function viewEntity($entity_id) { $account = $this->getAccount(); $me = parent::viewEntity($account->uid); $me['picture'] = $account->picture ? file_create_url($account->picture->uri) : file_create_url(file_load(variable_get('default_user_picture_fid'))->uri); return $me; }
/** * Overrides \RestfulEntityBase::viewEntity(). * * Always return the current user. */ public function viewEntity($entity_id) { $account = $this->getAccount(); return array(parent::viewEntity($account->uid)); }
/** * Overriding the create entity method in order to load the password.inc file. */ public function createEntity() { require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc'); return parent::createEntity(); }