Project

General

Profile

« Previous | Next » 

Revision 1425

Added by Dietmar almost 14 years ago

redefined wrong admin backlinks

View differences:

email.php
23 23
$current_password = $wb->get_post('current_password');
24 24
$email = $wb->get_post('email');
25 25

  
26
// Create a javascript back link
27
$js_back = WB_URL.'/account/preferences.php';
28

  
26 29
if (!$wb->checkFTAN())
27 30
{
28
	$wb->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], WB_URL);
31
	$wb->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $js_back, false);
29 32
	exit();
30 33
}
31 34

  
32
// Create a javascript back link
33
$js_back = "javascript: history.go(-1);";
34

  
35 35
// Get existing password
36 36
// $database = new database();
37 37
$query = "SELECT user_id FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
......
53 53
$query = "UPDATE ".TABLE_PREFIX."users SET email = '$email' WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
54 54
$database->query($query);
55 55
if($database->is_error()) {
56
	$wb->print_error($database->get_error,'index.php', false);
56
	$wb->print_error($database->get_error,$js_back, false);
57 57
} else {
58
	$wb->print_success($MESSAGE['PREFERENCES']['EMAIL_UPDATED'], WB_URL.'/account/preferences.php');
58
	$wb->print_success($MESSAGE['PREFERENCES']['EMAIL_UPDATED']);
59 59
	$_SESSION['EMAIL'] = $email;
60 60
}
61 61

  

Also available in: Unified diff