mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 14:03:17 +00:00
[DS-1530] Insist on a nonblank email address
This commit is contained in:
@@ -45,7 +45,7 @@ import org.dspace.eperson.Group;
|
|||||||
public final class CreateAdministrator
|
public final class CreateAdministrator
|
||||||
{
|
{
|
||||||
/** DSpace Context object */
|
/** DSpace Context object */
|
||||||
private Context context;
|
private final Context context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For invoking via the command line. If called with no command line arguments,
|
* For invoking via the command line. If called with no command line arguments,
|
||||||
@@ -123,10 +123,15 @@ public final class CreateAdministrator
|
|||||||
System.out.flush();
|
System.out.flush();
|
||||||
|
|
||||||
email = input.readLine();
|
email = input.readLine();
|
||||||
if (email != null)
|
if (!StringUtils.isBlank(email))
|
||||||
{
|
{
|
||||||
email = email.trim();
|
email = email.trim();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.println("Please provide an email address.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
System.out.print("First name: ");
|
System.out.print("First name: ");
|
||||||
System.out.flush();
|
System.out.flush();
|
||||||
|
Reference in New Issue
Block a user