36 lines
850 B
PHP
36 lines
850 B
PHP
<?php
|
|
$u = u();
|
|
$post = $_POST;
|
|
unset($post['_token']);
|
|
unset($post['name']);
|
|
unset($post['surname']);
|
|
unset($post['prefix']);
|
|
|
|
if(!postesit("password","")) {
|
|
|
|
$post['password'] = Hash::make(post("password"));
|
|
$subject = "Your password has been changed.";
|
|
try {
|
|
@mailSend($u->email,$subject,"Your password has just been successfully changed. If you think you didn't do this. Contact us immediately and reset your password.");
|
|
} catch (\Throwable $th) {
|
|
//throw $th;
|
|
}
|
|
bilgi($subject);
|
|
} else {
|
|
unset($post['password']);
|
|
}
|
|
|
|
db("users")
|
|
->where("id",$u->id)
|
|
->update($post);
|
|
|
|
echo("Your information has been successfully updated.");
|
|
?>
|
|
|
|
<script>
|
|
function goBack() {
|
|
window.history.back();
|
|
// veya window.history.go(-1);
|
|
}
|
|
goBack();
|
|
</script>
|