original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Registers new account.
  @return int
docstring_tokens: Registers new account .