YaWK
24.1
Yet another WebKit
check-emailChange.php
Go to the documentation of this file.
1
<?php
2
/* check if email is already registered */
3
if
(!empty($_POST[
'newEmail'
]))
4
{
5
include
'../../../classes/db.php'
;
6
$db
= new \YAWK\db();
7
$request =
$db
->quote($_POST[
'newEmail'
]);
8
if
(
$res
=
$db
->query(
"SELECT email FROM {users} WHERE email = '"
.$request.
"'"
))
9
{
// fetch data
10
$result
= mysqli_fetch_row(
$res
);
11
if
(
$result
[0])
12
{
// email found
13
$address_found = count(
$res
[0]);
14
if
($address_found == 0)
15
{
16
echo
"true"
;
17
die
;
// email just found 1 time, that appears to be users' email
18
// so the email seems to be valid.
19
}
20
else
21
{
22
echo
"false"
;
23
die
;
// email not in use
24
}
25
}
26
}
27
}
/*
28
else
29
{ // get var is invalid
30
echo "false";
31
}
32
*/
die
die
Definition:
block-user.php:27
$db
$db
Definition:
dismiss-notifications.php:4
$result
$result
Definition:
email-send.php:137
$res
$res
Definition:
settings-assets.php:149
yawk.io
system
plugins
signup
js
check-emailChange.php
Generated on Tue Jan 16 2024 21:59:02 for YaWK by
doxygen 1.9.1