TOPIC:

Encrypt psw Form on a specific Table 2 weeks 5 days ago #273425

  • Topic Author
  • midimoinsdix
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 73
  • Thanks: 0
Hi

I build a form to save on a specific table (login, name, psw) with integrator.

I need to crypt the password.

I managed to encrypt the password in `#__facileforms_subrecords` by following information from the forum .

But it is not encrypted in my table specific record ?

Should I add something?

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

Encrypt psw Form on a specific Table 2 weeks 5 days ago #273428

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10068
  • Karma: 3
  • Thanks: 679
Hi,

simply try to change the query then, UPDATE #__yourspecific joomla table-
Open the phpmyadmin, find your table, and carefully look where Joomla is storing passwords under which column.

Regards,
Tihana

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

Encrypt psw Form on a specific Table 2 weeks 5 days ago #273430

  • Topic Author
  • midimoinsdix
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 73
  • Thanks: 0
Of sure !

But I have just a little bug with my 'WHERE'
Fields of my SpecificTable are :
id | nom | prenom | username | email | password


$this->execPieceByName('ff_InitLib');
jimport( 'joomla.user.helper' );
$newpassword = ff_getSubmit('motdepasse');
$mynom = ff_getSubmit('nom');
$myprenom = ff_getSubmit('prenom');
$value = JUserHelper::hashPassword($newpassword);
$db = JFactory::getDBO();
$db->setQuery("UPDATE `#__SpecificTable` SET password = ".$db->quote($value)." WHERE nom = $mynom AND prenom=$myprenom");
$db->query();

What's wrong ?

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

Last edit: Post by midimoinsdix.

Encrypt psw Form on a specific Table 2 weeks 5 days ago #273431

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10068
  • Karma: 3
  • Thanks: 679
Hi,

did you try like this:
$this->execPieceByName('ff_InitLib');
jimport( 'joomla.user.helper' );
$newpassword = ff_getSubmit('motdepasse');
$mynom = ff_getSubmit('nomstagiaire');
$myprenom = ff_getSubmit('prenomstagiaire');
$value = JUserHelper::hashPassword($newpassword);
$db = JFactory::getDBO();
$db->setQuery("UPDATE `#__SpecificTable` SET password = ".$db->quote($value)." WHERE nom = ". $db->quote($mynom)." AND prenom=". $db->quote($myprenom));
$db->query();

Regards,
Tihana

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

Last edit: Post by tihana.krivic. Reason: fixed the code

Encrypt psw Form on a specific Table 2 weeks 5 days ago #273433

  • Topic Author
  • midimoinsdix
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 73
  • Thanks: 0
Ok the form bug was desepear but now the encrypt doesn't work !?

Fields of my SpecificTable are :
This message contains confidential information


The field name of my form are :
This message contains confidential information

$this->execPieceByName('ff_InitLib');
jimport( 'joomla.user.helper' );
$newpassword = ff_getSubmit('motdepasse');
$mynom = ff_getSubmit('nomstagiaire');
$myprenom = ff_getSubmit('prenomstagiaire');
$value = JUserHelper::hashPassword($newpassword);
$db = JFactory::getDBO();
$db->setQuery("UPDATE `#__SpecificTable` SET password = ".$db->quote($value)." WHERE nom = '$mynom' AND prenom='$myprenom' ");
$db->query();

a idea ?

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

Encrypt psw Form on a specific Table 2 weeks 5 days ago #273434

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10068
  • Karma: 3
  • Thanks: 679
Hi,

I think this should work
$this->execPieceByName('ff_InitLib');
jimport( 'joomla.user.helper' );
$newpassword = ff_getSubmit('motdepasse');
$mynom = ff_getSubmit('nomstagiaire');
$myprenom = ff_getSubmit('prenomstagiaire');
$value = JUserHelper::hashPassword($newpassword);
$db = JFactory::getDBO();
$db->setQuery("UPDATE `#__SpecificTable` SET password = ".$db->quote($value)." WHERE nom = ". $db->quote($mynom)." AND prenom=". $db->quote($myprenom));
$db->query();
I already fixed the code in previous message, but probably we put the message in same time :)

Regards,
Tihana

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

Last edit: Post by tihana.krivic.
Moderators: ForumSupport
Time to create page: 0.052 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!