Skip to main content

Reply To: How to make upload logo for dealer as a required field?

ClassiBase classifieds script Forums General help How to make upload logo for dealer as a required field? Reply To: How to make upload logo for dealer as a required field?

#1101 Reply

Elite Tan
Participant

dear Support, I’ve added above code, after I’ve selected a logo to upload, and click on check box to agree, it display below error, appreciate you can help and advice what’s wrong?
———–
Error accured while creating your account. Please try again later.
———–

if($dealer)
{
// set user as dealer
$user->level = User::PERMISSION_DEALER;

// check if can auto approve dealer
if(Config::option(‘account_dealer_auto_approve_reg
istration’))
{
// set user as dealer
$user->enabled = 1;
}
else
{
// set user as pending to be approved as
dealer
$user->enabled = 0;
}

// upload image if set
if(User::uploadLogo($user, ‘logo’) === false)
{
// if error on uploading logo
return $user;
}
if(!strlen($user->logo)){
// image not uploaded
$this->validation()->set_error(__(‘Error up
loading
logo. Please select logo to upload.’));
return $user;

}
}
else

  • Classifieds Business Newsletter

    Get discounts and tips about growing your classifieds website.

    Subscribe