Skip to content

Commit e7fe9ff

Browse files
committed
Fixed: Username will be empty in sys_user when a tab is changed in client form.
1 parent 2787230 commit e7fe9ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interface/web/client/client_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
3+
Copyright (c) 2005 - 2008, Till Brehm, projektfarm Gmbh
44
All rights reserved.
55
66
Redistribution and use in source and binary forms, with or without modification,
@@ -72,7 +72,7 @@ function onShowEnd() {
7272
$text = '';
7373
foreach($tplAdd as $item){
7474
if (trim($item) != ''){
75-
if ($text != '') $text .= '<br>';
75+
if ($text != '') $text .= '<br />';
7676
$text .= $tpl[$item];
7777
}
7878
}
@@ -132,7 +132,7 @@ function onAfterUpdate() {
132132
global $app;
133133

134134
// username changed
135-
if($this->oldDataRecord['username'] != $this->dataRecord['username']) {
135+
if(isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
136136
$username = mysql_real_escape_string($this->dataRecord["username"]);
137137
$client_id = $this->id;
138138
$sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";

0 commit comments

Comments
 (0)