From a137fedd7d1f2b63a5bed6627bd4b3e528d682c7 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 12 Jul 2010 12:52:25 -0400 Subject: [PATCH] Clean up this code. --- etc/inc/auth.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index fed2a678a5..94179d52b4 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -286,13 +286,12 @@ function local_user_set(& $user) { mkdir($home_base, 0755); /* configure shell type */ - if (!(userHasPrivilege($user, "user-shell-access") || userHasPrivilege($user, "page-all"))) { - if (!userHasPrivilege($user, "user-copy-files")) - $user_shell = "/sbin/nologin"; - else - $user_shell = "/usr/local/bin/scponly"; - } else { + if (userHasPrivilege($user, "user-shell-access") || userHasPrivilege($user, "page-all")) { $user_shell = "/bin/tcsh"; + } elseif (!userHasPrivilege($user, "user-copy-files")) { + $user_shell = "/sbin/nologin"; + } else { + $user_shell = "/usr/local/bin/scponly"; } /* root user special handling */