Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marcus Andersson
aurweb
Commits
6d65997f
Commit
6d65997f
authored
Nov 12, 2009
by
Evangelos Foutras
🐱
Committed by
Loui Chang
Nov 13, 2009
Browse files
Add uid_from_email(), similar to uid_from_username
Signed-off-by:
Loui Chang
<
louipc.ist@gmail.com
>
parent
6ee8b88c
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/lib/aur.inc
View file @
6d65997f
...
...
@@ -400,7 +400,26 @@ function uid_from_username($username="")
return
"None"
;
}
$row
=
mysql_fetch_row
(
$result
);
return
$row
[
0
];
}
# obtain the uid given a Users.Email
#
function
uid_from_email
(
$email
=
""
)
{
if
(
!
$email
)
{
return
""
;
}
$dbh
=
db_connect
();
$q
=
"SELECT ID FROM Users WHERE Email = '"
.
mysql_real_escape_string
(
$email
)
.
"'"
;
$result
=
db_query
(
$q
,
$dbh
);
if
(
!
$result
)
{
return
"None"
;
}
$row
=
mysql_fetch_row
(
$result
);
return
$row
[
0
];
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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