OS Property support center

Joomla User not integrated with Osproperty?

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 10 months ago #38163 by kalesh.suby
Joomla User not integrated with Osproperty? was created by kalesh.suby
Hi Dam,

As you know joomla users already enter username, password, email and name when they register. When a joomla user is trying to add a property, he should be taken to a page saying -"YOU MUST COMPLETE AGENT REGISTRATION FIRST". This Agent registration page should have the password, email, name and username fields hidden for a Joomla user.

Currently, a jooma user gets a boring message that will make them run away from the site - "You do not have permission to go to this area"

Can you please fix this? I am not requesting integration with jomsocial, kunena or CB - I am just requesting integration with JOOMLA because OSproperty is a joomla component ! . This is needed when the site uses other extensions, login modules, and in my case site has hundreds of existing registered joomla users.

Thanks

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38165 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: Joomla User not integrated with Osproperty?
Hi,
When you are registered-users and you click on Add property link, you will be redirect to home page with the message "You do not have permission to go to this area". And if you go to Agent registration page after logged in, you won't see the username, password fields.
The Agent registration page has 2 options.
1- For non-registered user, they can register to become Joomla user and agent
2- For registered user, they can register to become an agent only
Dam

Please Log in or Create an account to join the conversation.

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 10 months ago #38167 by kalesh.suby
Replied by kalesh.suby on topic Re: Joomla User not integrated with Osproperty?
Hi Dam,

1) I log in as a registered joomla user

2) I click on "Add property" menu and I get home page with message - You do not have permission to go to this area

3) I click on "Agent Registration" menu and I get same thing - You do not have permission to go to this area

When a logged in Joomla user clicks on "Add property" instead of saying " You do not have permission to go to this area", he should be REDIRECTED to Agent registration page right??

Also when a logged in Joomla user clicks on "Agent Registration" he should be shown Agent registration page hiding the email, name username and password right?

Please check.

Thanks

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38168 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: Joomla User not integrated with Osproperty?
You need to check in the Configuration > Tab agent to see the option "Allow user to register to become agent" is turned on or off?

Please Log in or Create an account to join the conversation.

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 10 months ago #38169 by kalesh.suby
Replied by kalesh.suby on topic Re: Joomla User not integrated with Osproperty?
Wow, That is smart configuration option - It works - 3 - Registration thing is solved.

2 is pending - When a logged in Joomla user clicks on "Add property" instead of saying " You do not have permission to go to this area", he should be REDIRECTED to Agent registration page right?? How to redirect to Agent register page. Is there any configuration like that?

Please Log in or Create an account to join the conversation.

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 10 months ago #38211 by kalesh.suby
Replied by kalesh.suby on topic Re: Joomla User not integrated with Osproperty?
Hi Dam.

When a logged in Joomla user clicks on "Add property" instead of only just saying " You do not have permission to go to this area", he should be REDIRECTED to Agent registration page right with a message "Please register as an Agent first"?? Otherwise he would not know why he did not have permission. How to redirect to Agent register page. Is there any configuration like that?


Thanks

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #38247 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: Joomla User not integrated with Osproperty?
Hi,
To redirect user to "Agent registration" page when they go to Add property page, please follow these steps:
1. Go to file:
components > com_osproperty > classes > listing.php
2. find
function edit($option,$id){
global $mainframe,$configs,$configClass;
$db = JFactory::getDBO();
$user = JFactory::getUser();

require_once(JPATH_COMPONENT_ADMINISTRATOR.DS."classes".DS."property.php");
require_once(JPATH_COMPONENT_ADMINISTRATOR.DS."helpers".DS."extrafields.php");
//check to see if user is agent

if(!HelperOspropertyCommon::isAgent()){
$mainframe->redirect(JUri::root(),JText::_('OS_YOU_DO_NOT_HAVE_PERMISION_TO_GO_TO_THIS_AREA'));
}

and change to

function edit($option,$id){
global $mainframe,$configs,$configClass;
$db = JFactory::getDBO();
$user = JFactory::getUser();

require_once(JPATH_COMPONENT_ADMINISTRATOR.DS."classes".DS."property.php");
require_once(JPATH_COMPONENT_ADMINISTRATOR.DS."helpers".DS."extrafields.php");
//check to see if user is agent

if(!HelperOspropertyCommon::isAgent()){
$mainframe->redirect(JUri::root().'index.php?option=com_osproperty&task=agent_register',JText::_('OS_YOU_DO_NOT_HAVE_PERMISION_TO_GO_TO_THIS_AREA'));
}


Good luck
Dam

Please Log in or Create an account to join the conversation.

  • kalesh.suby
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 10 months ago #38248 by kalesh.suby
Replied by kalesh.suby on topic Re: Joomla User not integrated with Osproperty?
Thanks Dam - I will make this change now.

Can you please add this to your next version so that everyone gets this? It will be useful and visitors will know why they are not able to add property.

Thanks

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #55441 by devinda
will this change work to the current version. i need to redirect public users when they click add property redirect them to agent register

and some register users menu shows in public. why is that

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #55497 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Re: Joomla User not integrated with Osproperty?
Public user don't have permission to add properties at front-end of component.
I also answered this question in ticket system before i refunded the money of transaction back to you.
Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Dang Thuc DamNguyen Phu Quan