Skip to content

MongoDb user with id = MongoDB/BSON/ObjectId #15189

@BenasPaulikas

Description

@BenasPaulikas

I'm not sure if this is a bug or I should handle it. :)

What steps will reproduce the problem?

Create users collection in mongodb. Login as user. Make auth key no more valid and /yii/web/user will try do this but id is not a string but ObjectId and it will throw Array to string conversion

Yii::warning("Invalid auth key attempted for user '$id': $authKey", METHOD);

What is the expected result?

Maybe do (string) $id ? I'm not sure

What do you get instead?

Array to string conversion exception

Additional info

Q A
Yii version 2.0.?
PHP version 7.1
Operating system Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions