diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-05-06 11:52:09 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-05-06 11:52:09 +0000 |
| commit | 26ee00a8526a15de827768c715a0fc27a4cee925 (patch) | |
| tree | e4544ad543e3d4cd1a69bc43f28aa153f44f8ebe /frontends/php/include/users.inc.php | |
| parent | 639aac687504d1c00010a4295c22f3e6fb878ffb (diff) | |
| download | zabbix-26ee00a8526a15de827768c715a0fc27a4cee925.tar.gz zabbix-26ee00a8526a15de827768c715a0fc27a4cee925.tar.xz zabbix-26ee00a8526a15de827768c715a0fc27a4cee925.zip | |
- better error reporting for GUI (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1757 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/users.inc.php')
| -rw-r--r-- | frontends/php/include/users.inc.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/frontends/php/include/users.inc.php b/frontends/php/include/users.inc.php index 9551064e..a6495424 100644 --- a/frontends/php/include/users.inc.php +++ b/frontends/php/include/users.inc.php @@ -23,11 +23,9 @@ function add_user($name,$surname,$alias,$passwd,$url) { - global $ERROR_MSG; - if(!check_right("User","A",0)) { - $ERROR_MSG="Insufficient permissions"; + error("Insufficient permissions"); return 0; } @@ -41,11 +39,9 @@ function update_user($userid,$name,$surname,$alias,$passwd, $url) { - global $ERROR_MSG; - if(!check_right("User","U",$userid)) { - $ERROR_MSG="Insufficient permissions"; + error("Insufficient permissions"); return 0; } @@ -71,8 +67,6 @@ function get_user_by_userid($userid) { - global $ERROR_MSG; - $sql="select * from users where userid=$userid"; $result=DBselect($sql); if(DBnum_rows($result) == 1) @@ -81,7 +75,7 @@ } else { - $ERROR_MSG="No user with itemid=[$userid]"; + error("No user with itemid=[$userid]"); } return $result; } |
