URGENT after_register.php

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 6 months ago #49204

Bonjour


./templates/MONTPL/html/com_hikashop/user/after_register.php est vide

comment recuperer l'user qui vient de s'enregistrer avec name username email password ?
j'ai essaye

<?
defined('_JEXEC') or die('Restricted access');
require_once JPATH_BASE.DS.'includes'.DS.'framework.php';
jimport( 'joomla.user.user' );
$user =& JFactory::getUser();
?>
<div class="user-msg">
<?= JText::sprintf('THANK_YOU_FOR_REGISTERING_2', $user->name); ?>  
<?= JText::sprintf('THANK_YOU_FOR_REGISTERING_3', $user->email,  $user->password);?>     
</div>
?>

mais je ne recupere pas l'$user

merci

Last edit: 12 years 6 months ago by erickb.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #49207

comme ceci:
$user = JRequest::getVar('main_user_data');

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 6 months ago #49208

mais avec quel require_once et que jimport ?

je recupere rien c'est pareil

Last edit: 12 years 6 months ago by erickb.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #49210

aucun require et aucun jimport. Sinon, je vous l'aurais dit.

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 6 months ago #49212

non ca ne marche pas je ne recupere rien

dans ./templates/MONTPL/html/com_hikashop/user/after_register.php

<?
$user = JRequest::getVar('main_user_data'); 
?>
<div class="user-msg">
<?= JText::sprintf('THANK_YOU_FOR_REGISTERING_2', $user->name); ?>  
<?= JText::sprintf('THANK_YOU_FOR_REGISTERING_3', $user->email,  $user->password);?>     
</div>

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #49213

Faites un var_dump de $user.
c'est $user pas $user->email

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 6 months ago #49215

ça marche

mais pourquoi (et comment) on ne recupere rien avec $user =& JFactory::getUser(); ?

merci

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #49216

$user =& JFactory::getUser(); récupère les informations de l'utilisateur courant.
Quand vous vous enregistrez vous n'etes pas connecté, et après l'enregistrement non plus.

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
12 years 6 months ago #49217

ok merci

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

Time to create page: 0.066 seconds
Powered by Kunena Forum