public function register()
    {
        $this->setPassword($this->password);
        $this->generateActivationToken();
        $this->generateAuthKey();
        $this->status = self::STATUS_REGISTERED;

        if (!$this->save()) {
            return self::RESP_ERR;
        }
        if (empty($this->email)) {
            return self::RESP_NO_EMAIL_ERR;
        }
        if (!$this->sendActivationEmail()) {
            return self::RESP_EMAIL_SEND_ERR;
        }
        return self::RESP_OK;
    }