Commit 89f83d2e authored by Leigh B Stoller's avatar Leigh B Stoller

Fix to previous revision.

parent 1e0a3310
...@@ -90,6 +90,7 @@ my $user_name; ...@@ -90,6 +90,7 @@ my $user_name;
my $user_email; my $user_email;
my $user_dbid; my $user_dbid;
my $user_uid; my $user_uid;
my $user_gid;
my $debug = 0; my $debug = 0;
# #
...@@ -261,6 +262,18 @@ if (defined($user)) { ...@@ -261,6 +262,18 @@ if (defined($user)) {
$user_dbid = $target_user->dbid(); $user_dbid = $target_user->dbid();
$user_uid = $target_user->uid(); $user_uid = $target_user->uid();
$USERUID = $target_user->unix_uid(); $USERUID = $target_user->unix_uid();
my $firstproject;
if ($target_user->FirstApprovedProject(\$firstproject) < 0) {
fatal("Could not determine first approved project");
}
if (defined($firstproject)) {
$user_gid = $firstproject->unix_gid();
}
else {
$user_gid = "guest";
}
} }
# #
...@@ -289,15 +302,6 @@ else { ...@@ -289,15 +302,6 @@ else {
# Initmode or genmode, do it and exit. # Initmode or genmode, do it and exit.
# #
if ($initmode || $genmode) { if ($initmode || $genmode) {
my $firstproject;
my $default_groupgid;
if ($target_user->FirstApprovedProject(\$firstproject) < 0 ||
!defined($firstproject)) {
fatal("Could not determine first approved project");
}
$user_gid = $firstproject->unix_gid();
if ($initmode) { if ($initmode) {
exit(InitUser()); exit(InitUser());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment