1 <script
type=
"text/javascript" src=
"system/engines/jquery/jquery.validate.min.js"></script>
2 <script
type=
"text/javascript" src=
"system/engines/jquery/messages_en.min.js"></script>
3 <script
type=
"text/javascript" src=
"system/engines/jquery/notify/bootstrap-notify.min.js"></script>
4 <!-- <script
type=
"text/javascript" src=
"system/plugins/signup/js/signup.js"></script> !-->
5 <link rel=
"stylesheet" href=
"system/engines/animateCSS/animate.min.css">
8 require_once
'system/plugins/signup/classes/signup.php';
9 require_once
'system/classes/backend.php';
10 $signup = new \YAWK\PLUGINS\SIGNUP\signup();
12 if (isset($_POST[
'settings-update']) && $_POST[
'settings-update'] ===
'1')
14 if (isset($_POST[
'uid']) && is_numeric($_POST[
'uid']))
16 foreach ($_POST as $property =>
$value)
19 if ($property !=
"settings-update"
20 && ($property !=
"sent")
21 && ($property !=
"submit")
22 && ($property !=
"newUsername")
23 && ($property !=
"profile-update")
24 && ($property !=
"newEmail")
25 && ($property !=
"newPassword1")
26 && ($property !=
"newPassword2")
30 \YAWK\user::setProperty(
$db, $_POST[
'uid'], $property,
$value);
33 else if ($property =
"newPassword2")
35 if (!empty($_POST[
'newPassword2']))
37 $newPassword =
$db->quote($_POST[
'newPassword2']);
39 \YAWK\user::setProperty(
$db, $_POST[
'uid'],
"password", md5($newPassword));
43 else if ($property =
"newEmail")
45 if (!empty($_POST[
'newEmail']))
47 $newEmail =
$db->quote($_POST[
'newEmail']);
49 \YAWK\user::setProperty(
$db, $_POST[
'uid'],
"email", $newEmail);
53 else if ($property =
"newUsername")
55 if (!empty($_POST[
'newUsername']))
57 $newUsername =
$db->quote($_POST[
'newUsername']);
59 \YAWK\user::setProperty(
$db, $_POST[
'uid'],
"username", $newUsername);
63 else if ($property =
"privacy")
65 if (!empty($_POST[
'privacy']))
67 $privacy =
$db->quote($_POST[
'privacy']);
68 \YAWK\user::setProperty(
$db, $_POST[
'uid'],
"privacy", $privacy);
72 else if ($property =
"public_email")
74 if (!empty($_POST[
'public_email']))
76 $publicEmail =
$db->quote($_POST[
'public_email']);
77 \YAWK\user::setProperty(
$db, $_POST[
'uid'],
"public_email", $publicEmail);
85 \YAWK\alert::draw(
"danger",
"Error",
"Could not update user settings because User ID is missing or wrong type.",
"",
"");
91 if (isset($_POST[
'sent']) && $_POST[
'sent'] ===
'1')
99 if (isset($_POST[
'gid']))
101 $gid = $_POST[
'gid'];
108 \YAWK\alert::draw(
"warning",
"Warning!",
"Error fetching group ID settings. Default Group set to 2",
"",
"");
116 echo
"<div style='text-align: center; margin-top: 20%; margin-bottom: 600px;'>
117 <h1>Hello ".$username.
"!<br><small>Thank you for your registration.</small></h1>
118 <p>Please, feel free to instant login! <br>";
124 print \YAWK\alert::draw(
"danger",
"Fehler!",
"The User <strong>".
$username.
"</strong> could not be registered!",
"",
"");
static draw($type, $title, $text, $redirect, $delay)
static drawContentWrapper()
Draw the AdminLTE Content Wrapper. Useful that view dont crash in situations where the DOM is not loa...
static getSetting($db, $property)
Get and return value for property from settings database.
static encodeChars($string)
convert german special chars and vowels into legal html
This class serves methods to create backup from files.