ZF-Commons / ZfcUser

A generic user registration and authentication module for ZF2. Supports Zend\Db and Doctrine2. (Formerly EdpUser)
BSD 3-Clause "New" or "Revised" License
495 stars 343 forks source link

Zend\Db\Adapter\Exception\InvalidQueryException on Register #29

Closed kenchou closed 12 years ago

kenchou commented 12 years ago

register user and zfcUser throw an exception 'Zend\Db\Adapter\Exception\InvalidQueryException' Message: Data truncated for column 'last_ip' at row 1

Reason: in UserMapper Class persists method called $user->toArray()

        $data = new ArrayObject($user->toArray());

and in ModelAbstract toArray() invoke getter method to return data but those method return a string instean of long int with default param:

    public function getLastIp($long = false)
    public function getRegisterIp($long = false)
markushausammann commented 12 years ago

Same problem here! The code has changed in the meantime but I get the same error when I try to register.

EvanDotPro commented 12 years ago

This should be resolved now -- the IP and datetime fields have been removed, in favor of extra data like that being added by separate modules which extend ZfcUser. The idea is to keep ZfcUser lightweight, yet highly extensible.