Skip to content

saveEmailIdentity #252

Answered by jadsy2107
jadsy2107 asked this question in Q&A
Jun 23, 2022 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

OK I figured it out, my pleasure

It was this that helped;

$user->active = 1;

I was skimming through the tests and found this;

    public function testUpdateEmail(): void
    {
        // Update user's email
        $this->user->email  = '[email protected]';
        $this->user->active = 0;

        $users = model(UserModel::class);
        $users->save($this->user);

        $user = $users->find($this->user->id);

        $this->seeInDatabase('auth_identities', [
            'user_id' => $user->id,
            'secret'  => '[email protected]',
        ]);
        $this->assertSame('[email protected]', $user->email);
    }

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jadsy2107
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@kenjis
Comment options

@jadsy2107
Comment options

Answer selected by jadsy2107
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants