aboutsummaryrefslogtreecommitdiff
path: root/GradeBook.tcl
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2010-12-16 22:56:35 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2010-12-16 22:56:35 -0500
commitb57b80cc8a9e0394a07a4a7becbeb42f2b9ec344 (patch)
tree6fde4570a8aa59f4afbfc286357be648c8edbc5c /GradeBook.tcl
parent89172be4283ddd9f249973ba26b8a7f88a0412a6 (diff)
downloadGradeBook-b57b80cc8a9e0394a07a4a7becbeb42f2b9ec344.tar.gz
GradeBook-b57b80cc8a9e0394a07a4a7becbeb42f2b9ec344.zip
simplified array existance check
darcs-hash:20101217035635-067c0-e900c7a6b50fa985597c720e29adf504d8d6180f.gz
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-xGradeBook.tcl3
1 files changed, 1 insertions, 2 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index f0fedf5..7f396bb 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -287,8 +287,7 @@ proc AccessGroupRights {db user password } {
set PasswordHash [::md5::md5 -hex $password]
set eval_str [list SELECT GroupName FROM PasswordsTable WHERE UserName='$user' AND PasswordHash='$PasswordHash']
db eval $eval_str group_name_array {}
- set name_found [array names group_name_array -exact GroupName]
- if { $name_found != ""} {
+ if { [ info exist group_name_array(GroupName) ] } {
set group $group_name_array(GroupName);
} else {
set group guest