Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

how to access from other component to a cook comp. 11 Dec 2012 19:27 #6021

Can anybody point me in the good direction?

I'm trying to access to a table/model of my cook component from com_users, is it possible?

I search the web but with no luck
The reason why is because I need to when a user (joomla user) logs in tho the system go to a table compoment and read data...

com_users/controller/user.php
// Perform the log in.
		if (true === $app->login($credentials, $options)) {
			// Success
			$app->setUserState('users.login.form.data', array());
			$app->redirect(JRoute::_($app->getUserState('users.login.form.return'), false));
		} else {
			// Login failed !
			$data['remember'] = (int)$options['remember'];
			$app->setUserState('users.login.form.data', $data);
			$app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
		}

in the coded above, when success check for som data in a table and then redirect to the cook component.

I think the redirect issue is covered , but how to get the data from a table component is my problem-.

thanks in advance

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

Re: how to access from other component to a cook comp. 11 Dec 2012 20:06 #6022

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
I would advise a login and/or profile plugin to hook into the login and other user events. Please see:

j-cook.pro/forum/9-coding-inside-your-co...s-from-2-params#5205 &
j-cook.pro/forum/7-design-your-applicati...-with-relations#5896

Hope it helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: admin, soportedo

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

Re: how to access from other component to a cook comp. 13 Dec 2012 11:17 #6046

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
If you want to write outside of your component, in a Joolma native one... DO NOT HACK.

> Do a plugin.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.076 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started