public function doUpdate($data)
    {
        $filter = array();
        $member = Member::get()->byID($data["ID"]);

        $this->extend("onBeforeUpdate", $data);

        // Check that a member isn't trying to mess up another users profile
        if (Member::currentUserID() && $member->canEdit(Member::currentUser())) {
            try {
                // Save member
                $this->saveInto($member);
                $member->write();
                
                $this->sessionMessage(
                    _t("Users.DETAILSUPDATED", "Account details updated"),
                    "success"
                );
            } catch (Exception $e) {
                $this->sessionMessage(
                    $e->getMessage(),
                    "warning"
                );
            }
        } else {
            $this->sessionMessage(
                _t("Users.CANNOTEDIT", "You cannot edit this account"),
                "warning"
            );
        }

        $this->extend("onAfterUpdate", $data);

        return $this->controller->redirectBack();
    }