diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-08-13 08:22:32 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-08-13 08:22:32 +0000 |
| commit | abaab90a1c9d3367f1ef636557cfe8e661716749 (patch) | |
| tree | 3e266e5523a635c45a7e7ef6d4571e7323f26065 /frontends/php/include/users.inc.php | |
| parent | 8901654871973b4267f106a97183001189189c82 (diff) | |
| download | zabbix-abaab90a1c9d3367f1ef636557cfe8e661716749.tar.gz zabbix-abaab90a1c9d3367f1ef636557cfe8e661716749.tar.xz zabbix-abaab90a1c9d3367f1ef636557cfe8e661716749.zip | |
- merger rev. 4546:4547 of branches/1.4.j [developed data monitoring of multiple nodes]
git-svn-id: svn://svn.zabbix.com/trunk@4549 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/users.inc.php')
| -rw-r--r-- | frontends/php/include/users.inc.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/frontends/php/include/users.inc.php b/frontends/php/include/users.inc.php index 9027e17e..44419f94 100644 --- a/frontends/php/include/users.inc.php +++ b/frontends/php/include/users.inc.php @@ -36,7 +36,6 @@ function add_user($name,$surname,$alias,$passwd,$url,$autologout,$lang,$refresh,$user_type,$user_groups,$user_medias) { global $USER_DETAILS; - global $ZBX_CURNODEID; if($USER_DETAILS['type'] != USER_TYPE_SUPER_ADMIN) { @@ -44,7 +43,7 @@ return 0; } - if(DBfetch(DBselect("select * from users where alias=".zbx_dbstr($alias)." and ".DBid2nodeid('userid')."=".$ZBX_CURNODEID))) + if(DBfetch(DBselect("select * from users where alias=".zbx_dbstr($alias)." and ".DBin_node('userid', get_current_nodeid(false))))) { error('User "'.$alias.'" already exists'); return 0; @@ -90,10 +89,8 @@ function update_user($userid,$name,$surname,$alias,$passwd, $url,$autologout,$lang,$refresh,$user_type,$user_groups,$user_medias) { - global $ZBX_CURNODEID; - if(DBfetch(DBselect("select * from users where alias=".zbx_dbstr($alias). - " and userid<>$userid and ".DBid2nodeid('userid')."=".$ZBX_CURNODEID))) + " and userid<>$userid and ".DBin_node('userid', get_current_nodeid(false))))) { error("User '$alias' already exists"); return 0; @@ -196,9 +193,7 @@ function add_user_group($name,$users=array(),$rights=array()) { - global $ZBX_CURNODEID; - - if(DBfetch(DBselect("select * from usrgrp where name=".zbx_dbstr($name)." and ".DBid2nodeid('usrgrpid')."=".$ZBX_CURNODEID))) + if(DBfetch(DBselect('select * from usrgrp where name='.zbx_dbstr($name).' and '.DBin_node('usrgrpid', get_current_nodeid(false))))) { error("Group '$name' already exists"); return 0; @@ -231,10 +226,8 @@ function update_user_group($usrgrpid,$name,$users=array(),$rights=array()) { - global $ZBX_CURNODEID; - - if(DBfetch(DBselect("select * from usrgrp where name=".zbx_dbstr($name). - " and usrgrpid<>".$usrgrpid." and ".DBid2nodeid('usrgrpid')."=".$ZBX_CURNODEID))) + if(DBfetch(DBselect('select * from usrgrp where name='.zbx_dbstr($name). + ' and usrgrpid<>'.$usrgrpid.' and '.DBin_node('usrgrpid', get_current_nodeid(false))))) { error("Group '$name' already exists"); return 0; |
