Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Stay logged in for 30 days

With “Remember me” ticked, users stay logged in for 30 days instead of 14.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Category Users
  • Tested with WordPress 7.1
PHP
<?php

add_filter(
	'auth_cookie_expiration',
	static fn( $seconds, $user_id, $remember ) => $remember ? 30 * DAY_IN_SECONDS : $seconds,
	10,
	3
);

In these packs

  • Users and profiles: Registration dates, last logins, social profile fields, longer sessions and stricter passwords.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.