Advertisement:

Author Topic: Add item -> Skip email validate (registered users)  (Read 2215 times)

code monkey

  • Full Member
  • ***
  • Posts: 204
Add item -> Skip email validate (registered users)
« on: March 13, 2011, 02:45:50 am »
/os-includes/osclass/ItemActions.php

If you have "require email validate" on, but don't want already registered users to validate
their email each time they post, you can make this edit.

Find (Line 48):
Code: [Select]
if($this->is_admin || !$has_to_validate) {
Replace with:
Code: [Select]
if($this->is_admin || !$has_to_validate || osc_is_web_user_logged_in()) {
Find (Line 104):
Code: [Select]
if ($this->is_admin || !$has_to_validate) {
Replace with:
Code: [Select]
if ($this->is_admin || !$has_to_validate || osc_is_web_user_logged_in()) {
Find (Line 118):
Code: [Select]
if(!$this->is_admin) {
Replace with:
Code: [Select]
if(!$this->is_admin && !osc_is_web_user_logged_in()) {
Find (Line 127):
Code: [Select]
               if(osc_item_validation_enabled()) {
                    osc_add_flash_message( _m('Great! You\'ll receive an e-mail to activate your item')) ;

Replace with:
Code: [Select]
               if(osc_item_validation_enabled() && !osc_is_web_user_logged_in()) {
                    osc_add_flash_message( _m('Great! You\'ll receive an e-mail to activate your item')) ;

Now when a registered user posts an ad, it will appear immediately.

goona

  • Newbie
  • *
  • Posts: 8
Re: Add item -> Skip email validate (registered users)
« Reply #1 on: March 13, 2011, 05:53:10 am »
Thanks for this post m8 its really is appreciated aspecialy by a numb nut like myself  ;D

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Add item -> Skip email validate (registered users)
« Reply #2 on: March 14, 2011, 12:32:11 pm »
Same story as always, follor the development here : http://issues.osclass.org/browse/OSCLASS-369

Anyway, I think if the user is registered and logged it will not be asked for the email again. Have to check about that.

Thanks!

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Add item -> Skip email validate (registered users)
« Reply #3 on: March 14, 2011, 07:31:31 pm »
Fixed!

The fix was a bit different, since for example, line 118 should not be modified, but you gave us a great idea.

Thanks!