[Vtigercrm-developers] Does the "Forgot Password" function of Customer Portal actually work?

Manuel Fernando ptdesigner at gmail.com
Thu Sep 29 10:35:02 GMT 2016


Hello,

> What is this function supposed to do?
Nothing from what i can see.

You can only do this way: disable user access to portal and enable again to send welcome email to user again with new password.



If you want to go further with your test, check the new changes

There are new changes in http://code.vtiger.com/vtiger/vtigercrm/commit/f630425f8fbe9f1986830b7e5900e4c138827bce <http://code.vtiger.com/vtiger/vtigercrm/commit/f630425f8fbe9f1986830b7e5900e4c138827bce>
http://code.vtiger.com/vtiger/vtigercrm/commit/2a89391c30e23600dab5367e83337a60d2eb8e8d <http://code.vtiger.com/vtiger/vtigercrm/commit/2a89391c30e23600dab5367e83337a60d2eb8e8d>

This will break first email send to user when portal is enabled at first time user is created.

“
This $conditions result in a failure at first creation of a contact because this two operations as code means needs to operate at the same time.

So if you create a contact with portal "access on", email "is not empty" AND at the same time email "has changed" wil not send email with access to portal because it's a non sense.

'fieldname' => 'email', 'operation' => 'has changed',

AND

'fieldname' => 'email', 'operation' => 'is not empty',

“

In resume, you need to change email address and change it back to send welcome email




Best Regards.

Manuel



> No dia 29/09/2016, às 11:19, Alan Lord <alanslists at gmail.com> escreveu:
> 
> I am testing a migrating for a client from 6.4.0 to 6.5.0 and as they are a heavy Portal user I wanted to make sure that the change to the encrypted passwords works properly.
> 
> Everything I have tested with a migrated 6.5.0 and the portal seems to work OK except when I choose the "Forgot Password" option on the portal...
> 
> The call gets to vtiger OK but no email is ever sent to the user:
> 
> 
>> Thu Sep 29 09:56:23 2016,893 [6578] INFO VT - PearDatabase ->ADODB disconnect
>> Thu Sep 29 09:56:23 2016,958 [6578] DEBUG VT - Entering customer portal function getPortalUserid
>> Thu Sep 29 09:56:23 2016,958 [6578] DEBUG VT - Prepared sql query being executed : SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'userid' AND tabid = 0
>> Thu Sep 29 09:56:23 2016,959 [6578] DEBUG user - Entering Users() method ...
>> Thu Sep 29 09:56:23 2016,959 [6578] DEBUG VT - Entering getColumnFields(Users) method ...
>> Thu Sep 29 09:56:23 2016,959 [6578] DEBUG VT - in getColumnFields Users
>> Thu Sep 29 09:56:23 2016,959 [6578] DEBUG VT - Prepared sql query being executed : SELECT tabid, name, ownedby FROM vtiger_tab
>> Thu Sep 29 09:56:23 2016,964 [6578] DEBUG VT - Prepared sql query being executed : SELECT tabid, fieldname, fieldid, fieldlabel, columnname, tablename, uitype, typeofdata, presence
>>                FROM vtiger_field WHERE tabid in (?)
>> Thu Sep 29 09:56:23 2016,964 [6578] DEBUG VT - Prepared sql query parameters : [29]
>> Thu Sep 29 09:56:23 2016,975 [6578] DEBUG VT - Exiting getColumnFields method ...
>> Thu Sep 29 09:56:23 2016,975 [6578] DEBUG user - Exiting Users() method ...
>> Thu Sep 29 09:56:23 2016,978 [6578] DEBUG customerportal - Entering customer portal function send_mail_for_password
>> Thu Sep 29 09:56:23 2016,978 [6578] INFO VT - PearDatabase ->Inside the function send_mail_for_password(alan at hidden.co.uk).
>> Thu Sep 29 09:56:23 2016,979 [6578] DEBUG customerportal - Prepared sql query being executed : select * from vtiger_portalinfo  where user_name = ?
>> Thu Sep 29 09:56:23 2016,979 [6578] DEBUG customerportal - Prepared sql query parameters : [alan at hidden.co.uk]
>> Thu Sep 29 09:56:23 2016,979 [6578] DEBUG customerportal - Prepared sql query being executed : select vtiger_users.user_name, vtiger_users.email1 from vtiger_users inner join vtiger_crmentity on vtiger_users.id = vtiger_crmentity.smownerid inner join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_crmentity.crmid where vtiger_contactdetails.email =?
>> Thu Sep 29 09:56:23 2016,980 [6578] DEBUG customerportal - Prepared sql query parameters : [alan at hidden.co.uk]
>> Thu Sep 29 09:56:23 2016,983 [6578] DEBUG customerportal - Prepared sql query being executed : SELECT * FROM vtiger_tab
>> Thu Sep 29 09:56:24 2016,002 [6578] DEBUG customerportal - Prepared sql query being executed : SELECT fieldname,modulename,tablename,entityidfield,entityidcolumn from vtiger_entityname
>> Thu Sep 29 09:56:24 2016,007 [6578] DEBUG customerportal - Prepared sql query being executed : select * from vtiger_systems where server_type=?
>> Thu Sep 29 09:56:24 2016,007 [6578] DEBUG customerportal - Prepared sql query parameters : [email]
>> Thu Sep 29 09:56:24 2016,044 [6578] INFO VT - PearDatabase ->Exit from send_mail_for_password. false@@@<b></b>
>> Thu Sep 29 09:56:24 2016,044 [6578] DEBUG customerportal - Exiting customer portal function send_mail_for_password
> 
> In the function above I see the comment:
> 
>> 	// We no longer have the original password!
>> 	if (!empty($adb->query_result($res, 0, 'cryptmode'))) {
>> 		$password = '*****';
>> 		// TODO - we need to send link to reset the password
>> 		// For now CRM user can do the same.
>> 	}
> 
> I see a glaring issue with this function in that it uses $mod_strings... As far as I can tell this is *non-existent* in vtiger 6.
> 
> The queries seem to me to be trying to create an email which would be sent to the Contact's Assigned User? But on my system it never gets sent, but because of the $mod_strings issue I have no idea which error was trapped.
> 
> Has anyone tested this before?
> 
> Thanks
> 
> Al
> 
> 
> What is this function supposed to do?
> 
> 
> 
> 
> _______________________________________________
> http://www.vtiger.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20160929/ed7cb606/attachment-0001.html>


More information about the vtigercrm-developers mailing list