Advertisement:

Author Topic: ads posting for registered users without login  (Read 897 times)

Abhi

  • Jr. Member
  • **
  • Posts: 78
  • Love what you do :)
ads posting for registered users without login
« on: April 16, 2015, 10:45:56 am »
Hi
I am allowing registered users to post ad without login. Everything is working fine but when user logs in he is not able to see the listing in manage listing and in admin also that listing is not linked user who is registered with that mail id
i had modified the following function
oc-includes/osclass/controller/item.php

if(!osc_is_web_user_logged_in()) {
                        $user = User::newInstance()->findByEmail($mItems->data['contactEmail']);
                        // The user exists but it's not logged
                        /*if(isset($user['pk_i_id'])) {
                            foreach( $mItems->data as $key => $value ) {
                                Session::newInstance()->_keepForm($key);
                            }
                            osc_add_flash_error_message( _m('A user with that email address already exists, if it is you, please log in'));
                            $this->redirectTo(osc_user_login_url());
                        }*/
                    }


Please Help me or any other way of linking email for the user

wahaj

  • Newbie
  • *
  • Posts: 1
Re: ads posting for registered users without login
« Reply #1 on: October 27, 2016, 02:24:14 am »
Just remove these line

osc_add_flash_error_message( _m('A user with that email address already exists, if it is you, please log in'));
                            $this->redirectTo(osc_user_login_url());

from
oc-includes/osclass/controller/item.php