Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a3d8f12a
Commit
a3d8f12a
authored
Nov 13, 2000
by
Leigh B. Stoller
Browse files
Make sure project name is valid much earlier.
parent
f988a58e
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/usradded.php3
View file @
a3d8f12a
...
...
@@ -109,6 +109,21 @@ else {
}
}
#
# Lets verify the project name and quit early if the project is bogus.
# We could let things continue, resulting in a valid account but no
# project membership, but I don't like that.
#
$query_result
=
mysql_db_query
(
$TBDBNAME
,
"SELECT * FROM projects WHERE pid=
\"
$pid
\"
"
);
if
(
!
$query_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error retrieving info for
$pid
:
$err
\n
"
,
1
);
}
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
USERERROR
(
"No such project
$pid
. Please go back and try again."
,
1
);
}
#
# For a new user:
# * Create a new account in the database.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment