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

Alan Lord alanslists at gmail.com
Thu Sep 29 10:19:00 GMT 2016


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?






More information about the vtigercrm-developers mailing list