Jump to content

Recommended Posts

Posted

Hi,

I would use ProcessProfile core module in the fronted that way.

if (!$user->isGuest() && $input->urlSegment1 == 'edit') {
    echo $modules->get('ProcessProfile')->execute();
}

Problem is the form action, because after send the form the url segment "edit" is missing.

To get it work I have to change the following line (ProcessProfile line 58).

// changed $form->attr('action', './');
$form->attr('action', '');  

Is there a way to do this without modify a core module?

Would be great to make such modules (ProcessProfile, ProcessLogin, ProcessPageEdit, ProcessPageAdd) more flexible for usage in the site frontend.

Posted

I could be wrong, but the answer you will most likely get are that those modules were never really meant to be used in the frontend :-). Process modules are meant to run in PW admin for various reasons. If your goal is to avoid certain users from accessing the admin, there are various examples in the forums on how that can be achieved including Fredi, etc. 

Posted

I'll write a edit profile module myself if there is no way to get it work, but would be great to use a existing core module ;)

Posted

I could be wrong, but the answer you will most likely get are that those modules were never really meant to be used in the frontend :-). Process modules are meant to run in PW admin for various reasons.

I know and understand it, but if modules work with minor tweaks also in the frontend... why reinvent the wheel and duplicate such modules?

If form action would be changed or configurable the module would work for both. Backend and frontend.

How ever. Because it sounds there is no need for the mentioned change I have to build me a solution (based on FormHelper and FrontendContentManager modules it should be done with some lines of code)...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...