mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Fix de bugs
This commit is contained in:
parent
e47d769964
commit
1dda3958d9
11 changed files with 23 additions and 22 deletions
|
@ -44,7 +44,7 @@
|
|||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('profile', 'showAll');
|
||||
header('Location: ' . $this->generateUrl('profile', 'showAll'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
|||
$user = $db->getFromTableWhere('users', ['email' => $_SESSION['email']]);
|
||||
$password = sha1($_POST['password']);
|
||||
|
||||
if (!$db->updateTableWhere('users', ['password' => $password], ['id' => $user['id']]))
|
||||
if (!$db->updateTableWhere('users', ['password' => $password], ['id' => $user[0]['id']]))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Impossible de mettre à jour le mot de passe.';
|
||||
header('Location: ' . $this->generateUrl('profile', 'show'));
|
||||
|
@ -86,7 +86,7 @@
|
|||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('profile', 'showAll');
|
||||
header('Location: ' . $this->generateUrl('profile', 'showAll'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
|||
|
||||
$user = $db->getFromTableWhere('users', ['email' => $_SESSION['email']]);
|
||||
|
||||
if (!$db->updateTableWhere('users', ['email' => $email], ['id' => $user['id']]))
|
||||
if (!$db->updateTableWhere('users', ['email' => $email], ['id' => $user[0]['id']]))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Cette adresse e-mail est déjà utilisée.';
|
||||
header('Location: ' . $this->generateUrl('profile', 'show'));
|
||||
|
@ -139,7 +139,7 @@
|
|||
if (!internalTools::verifyCSRF($csrf))
|
||||
{
|
||||
$_SESSION['errormessage'] = 'Jeton CSRF invalide !';
|
||||
header('Location: ' . $this->generateUrl('profile', 'showAll');
|
||||
header('Location: ' . $this->generateUrl('profile', 'showAll'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue