refactor: fix code style
This commit is contained in:
parent
b422805af4
commit
e42c9262ef
2 changed files with 10 additions and 9 deletions
|
@ -48,9 +48,9 @@ $config->load();
|
|||
* database.
|
||||
*/
|
||||
session_start(
|
||||
array(
|
||||
[
|
||||
'name' => 'wishthis',
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
$user = User::getCurrent();
|
||||
|
|
|
@ -369,7 +369,8 @@ class User
|
|||
?: $this->email;
|
||||
}
|
||||
|
||||
public function updatePasswordHash(string $password, string $email): string {
|
||||
public function updatePasswordHash(string $password, string $email): string
|
||||
{
|
||||
global $database;
|
||||
$passwordHash = User::passwordToHash($password);
|
||||
|
||||
|
@ -379,7 +380,7 @@ class User
|
|||
WHERE `email` = :user_email',
|
||||
[
|
||||
"user_email" => $email,
|
||||
"password_hash" => $passwordHash
|
||||
"password_hash" => $passwordHash,
|
||||
]
|
||||
);
|
||||
return $passwordHash;
|
||||
|
@ -416,7 +417,7 @@ class User
|
|||
FROM `users`
|
||||
WHERE `email` = :user_email',
|
||||
[
|
||||
'user_email' => $email
|
||||
'user_email' => $email,
|
||||
]
|
||||
)
|
||||
->fetch(\PDO::FETCH_ASSOC);
|
||||
|
@ -452,7 +453,7 @@ class User
|
|||
SET `last_login` = NOW()
|
||||
WHERE `email` = :user_email',
|
||||
[
|
||||
'user_email' => $email
|
||||
'user_email' => $email,
|
||||
]
|
||||
);
|
||||
$user_database_fields['last_login'] = date('Y-m-d H:i');
|
||||
|
|
Loading…
Reference in a new issue