Skip to content

When no guest template is set, login cookies are not properly set #4814

@netniV

Description

@netniV

Describe the bug

When you log into the system and attempt to set the 'remember me' option, this does not appear to be set. After a lot of diagnosis, this turns out to be because the guest account is set to none, causing the get_guest_account() function to return 0. Comparing a username with 0 apparently results in a true result ('user' == 0 is apparently true!).

To Reproduce

Steps to reproduce the behavior:

  1. Goto settings, authentication, set the guest account to none
  2. Attempt to use the remember me functionality

Expected behavior

Changing the response to be blank does fix the issue but other functions are expecting a numeric value, so should check from a strict comparison ('user' === 0 would be false, as would false === 0 be false).

Some code is mismatching usernames against id's though and needs fixing.

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourconfirmedBug is confirm by dev teamresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions