Fixed multiple team->update in import_users
Show the pass at the end of import
This commit is contained in:
parent
c067f6dbbe
commit
745d8a8bd5
@ -181,8 +181,7 @@ case $1 in
|
||||
echo -e "Exported pkcs12 file is ${2}.p12"
|
||||
fi
|
||||
mv ${2}.crt ${TOP_DIR}/certs
|
||||
# TODO handle this file
|
||||
echo "$2:$pass" >> teams.pass
|
||||
echo "$2:$pass" >> ${TOP_DIR}/../teams.pass
|
||||
clean "client" $2
|
||||
;;
|
||||
"-revoke" )
|
||||
|
@ -48,15 +48,15 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
|
||||
|
||||
else if ($child->nodeName == "member")
|
||||
{
|
||||
if (!$team->update())
|
||||
// Slogan rly needed ?
|
||||
if (empty($team->id) && !$team->update())
|
||||
{
|
||||
$error .= "Unable to add team $team->team_name</br>";
|
||||
continue;
|
||||
$error .= "Unable to add team $team->team_name</br>";
|
||||
continue;
|
||||
}
|
||||
|
||||
$user = new Member();
|
||||
$user->team = $team;
|
||||
|
||||
foreach ($child->childNodes as $child_member)
|
||||
{
|
||||
if ($child_member->nodeName == "firstname")
|
||||
@ -87,6 +87,11 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
|
||||
$output .= new_client($team->team_name, $misc_dir);
|
||||
}
|
||||
}
|
||||
if (file_exists("$misc_dir/teams.pass"))
|
||||
{
|
||||
$output .= file_get_contents("$misc_dir/teams.pass");
|
||||
unlink("$misc_dir/teams.pass");
|
||||
}
|
||||
$template->assign("output", $output);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user