src/Controller/UsersController.php
private function _getUser($id, $token)
    {
        return $this->Users->find()
            ->where([
                'id'    => $id,
                'token' => $token
            ])
            ->first();
    }
private function _getUser($id, $token)
    {
        return $this->Users->find()
            ->where([
                'id'    => $id,
                'token' => $token
            ])
            ->first();
    }
private function _getUser ( $ id , $ token ) { return $ this -> Users -> find ( ) -> where ( [ 'id' => $ id , 'token' => $ token ] ) -> first ( ) ; }
Get user by id and activation token.

@param   int $id         User id.
@param   string $token   User activation token.
@return  array|User|null
Get user by id and activation token .