79631685

Date: 2025-05-21 09:34:39
Score: 0.5
Natty:
Report link

Workaround:

Adding __serialize and __unserialize functions to User make form login possible.


    /**
     * 
     * @return string
     */
    public function __serialize(): array
    {
        return ['id' => $this->id, 'username' => $this->username, 'password' => $this->password];
    }

    /**
     * 
     * @param array $data
     */    
    public function __unserialize(array $data): void
    {
        $this->id = $data['id'];
        $this->username = $data['username'];
        $this->password = $data['password'];
    }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Andras