src/Pages/MemberProfilePageController.php
public function save(array $data, Form $form)
    {
        $member = Member::currentUser();

        $groupIds = $this->getSettableGroupIdsFrom($form, $member);
        $member->Groups()->setByIDList($groupIds);

        $form->saveInto($member);

        try {
            $member->write();
        } catch (ValidationException $e) {
            $validationMessages = implode("; ", $e->getResult()->getMessages());
            $form->sessionMessage($validationMessages, 'bad');
            return $this->redirectBack();
        }

        $form->sessionMessage(
            _t('MemberProfiles.PROFILEUPDATED', 'Your profile has been updated.'),
            'good'
        );
        return $this->redirectBack();
    }
public function save(array $data, Form $form)
    {
        $member = Member::currentUser();

        $groupIds = $this->getSettableGroupIdsFrom($form, $member);
        $member->Groups()->setByIDList($groupIds);

        $form->saveInto($member);

        try {
            $member->write();
        } catch (ValidationException $e) {
            $validationMessages = implode("; ", $e->getResult()->getMessages());
            $form->sessionMessage($validationMessages, 'bad');
            return $this->redirectBack();
        }

        $form->sessionMessage(
            _t('MemberProfiles.PROFILEUPDATED', 'Your profile has been updated.'),
            'good'
        );
        return $this->redirectBack();
    }
public function save ( array $ data , Form $ form ) { $ member = Member :: currentUser ( ) ; $ groupIds = $ this -> getSettableGroupIdsFrom ( $ form , $ member ) ; $ member -> Groups ( ) -> setByIDList ( $ groupIds ) ; $ form -> saveInto ( $ member ) ; try { $ member -> write ( ) ; } catch ( ValidationException $ e ) { $ validationMessages = implode ( "; " , $ e -> getResult ( ) -> getMessages ( ) ) ; $ form -> sessionMessage ( $ validationMessages , 'bad' ) ; return $ this -> redirectBack ( ) ; } $ form -> sessionMessage ( _t ( 'MemberProfiles.PROFILEUPDATED' , 'Your profile has been updated.' ) , 'good' ) ; return $ this -> redirectBack ( ) ; }
Updates an existing Member's profile.
Updates an existing Member s profile .