forked from CE-PhoenixCart/PhoenixCart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
account_edit.php
37 lines (25 loc) · 1.16 KB
/
account_edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2021 Phoenix Cart
Released under the GNU General Public License
*/
require 'includes/application_top.php';
$OSCOM_Hooks->register_pipeline('loginRequired');
$message_stack_area = 'account_edit';
// needs to be included earlier to set the success message in the messageStack
require language::map_to_translation('account_edit.php');
if (tep_validate_form_action_is('process')) {
$customer_details = $customer_data->process($customer_data->get_fields_for_page('account_edit'));
$OSCOM_Hooks->call('siteWide', 'injectFormVerify');
if (tep_form_processing_is_valid()) {
$customer_data->update($customer_details, ['id' => $customer->get_id()], 'customers');
tep_db_query("UPDATE customers_info SET customers_info_date_account_last_modified = NOW() WHERE customers_info_id = " . (int)$customer->get_id());
$messageStack->add_session('account', SUCCESS_ACCOUNT_UPDATED, 'success');
tep_redirect(tep_href_link('account.php'));
}
}
require $oscTemplate->map_to_template(__FILE__, 'page');
require 'includes/application_bottom.php';