tbrehm
2008-12-27 e7fe9ff29a7a65fd09510ea785ce7668b8a95c78
Fixed: Username will be empty in sys_user when a tab is changed in client form.
1 files modified
6 ■■■■ changed files
interface/web/client/client_edit.php 6 ●●●● patch | view | raw | blame | history
interface/web/client/client_edit.php
@@ -1,6 +1,6 @@
<?php
/*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
Copyright (c) 2005 - 2008, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -72,7 +72,7 @@
        $text = '';
        foreach($tplAdd as $item){
            if (trim($item) != ''){
                if ($text != '') $text .= '<br>';
                if ($text != '') $text .= '<br />';
                $text .= $tpl[$item];
            }
        }
@@ -132,7 +132,7 @@
        global $app;
        
        // username changed
        if($this->oldDataRecord['username'] != $this->dataRecord['username']) {
        if(isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
            $username = mysql_real_escape_string($this->dataRecord["username"]);
            $client_id = $this->id;
            $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";