mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fix logincookie() error
This commit is contained in:
@@ -57,14 +57,6 @@ class AuthenticateController extends Controller
|
||||
$user = User::query()->where('passkey', $passkey)->first(['id', 'passhash', 'secret', 'auth_key']);
|
||||
if ($user) {
|
||||
$ip = getip();
|
||||
/**
|
||||
* Not IP related
|
||||
* @since 1.8.0
|
||||
*/
|
||||
// $passhash = md5($user->passhash . $ip);
|
||||
// $passhash = md5($user->passhash);
|
||||
// do_log(sprintf('passhash: %s, ip: %s, md5: %s', $user->passhash, $ip, $passhash));
|
||||
// logincookie($user->id, $passhash,false, get_setting('system.cookie_valid_days', 365) * 86400, true, true, true);
|
||||
logincookie($user->id, $user->auth_key);
|
||||
$user->last_login = now();
|
||||
$user->save();
|
||||
|
||||
+1
-1
@@ -185,7 +185,7 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
'username', 'email', 'passhash', 'secret', 'stylesheet', 'editsecret', 'added', 'enabled', 'status',
|
||||
'leechwarn', 'leechwarnuntil', 'page', 'class', 'uploaded', 'downloaded', 'clientselect', 'showclienterror', 'last_home',
|
||||
'seedbonus', 'downloadpos', 'vip_added', 'vip_until', 'title', 'invites', 'attendance_card',
|
||||
'seed_points_per_hour', 'passkey', 'auth_key'
|
||||
'seed_points_per_hour', 'passkey', 'auth_key', 'last_login', 'lang'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user