Form->create($user, ['role' => 'form', 'novalidate' => true, 'type' => 'file']); ?>
Form->control('profile.first_name');
echo $this->Form->control('profile.last_name');
echo $this->Form->control('profile.phone');
echo $this->Form->control('profile.image_path', ['type' => 'file']);
echo !empty($user->profile->image_path) ? $this->Html->image(UPLOAD_IMAGE . $user->profile->model_name . '/' . $user->profile->image_path, ['width' => '100']) : '';
echo $this->Form->control('email');
echo $this->Form->control('password');
echo $this->Form->control('role_id', ['class' => 'select-with-search form-control', 'options' => $roles]);
echo $this->Form->control('gdpr_active');
echo $this->Form->control('is_active');
?>
Form->submit(__('Submit')); ?>
Form->end(); ?>