Пример #1
0
 public function insert()
 {
     $password = $this->get(Gpf_Db_Table_AuthUsers::PASSWORD);
     if (strlen(trim($password)) == 0) {
         $this->set(Gpf_Db_Table_AuthUsers::PASSWORD, Gpf_Common_String::generatePassword(8));
     }
     $this->generateAuthToken();
     $this->setIp(Gpf_Http::getRemoteIp());
     parent::insert();
 }
Пример #2
0
    /**
     * @param Gpf_DbEngine_Row $dbRow
     */
    protected function setDefaultDbRowObjectValues($dbRow) {
        $dbRow->set("accountid", Gpf_Session::getAuthUser()->getAccountId());
        $dbRow->set("numberuserid", 1);
        $dbRow->set("rtype", Pap_Application::ROLETYPE_AFFILIATE);

        $approvalType = Gpf_Settings::get(Pap_Settings::AFFILIATE_APPROVAL);
        if($approvalType == 'A') {
            $dbRow->set("rstatus", Gpf_Db_User::APPROVED);
        } else {
            $dbRow->set("rstatus", Gpf_Db_User::PENDING);
        }
        $dbRow->set("deleted", Gpf::NO);
        $dbRow->set("dateinserted", Gpf_Common_DateUtils::Now());
        $dbRow->set("refid", uniqid());
        $dbRow->set("rpassword", Gpf_Common_String::generatePassword(8));
        Gpf_Plugins_Engine::extensionPoint('PostAffiliate.AffiliateForm.setDefaultDbRowObjectValues', $dbRow);
    }
Пример #3
0
 /**
  * @param Gpf_DbEngine_Row $dbRow
  */
 protected function setDefaultDbRowObjectValues($dbRow) {
     parent::setDefaultDbRowObjectValues($dbRow);
     $dbRow->setPassword(Gpf_Common_String::generatePassword(8));
 }