<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class=""><blockquote type="cite" class="">What is this function supposed to do?</blockquote>Nothing from what i can see.</div><div class=""><br class=""></div><div class="">You can only do this way: disable user access to portal and enable again to send welcome email to user again with new password.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If you want to go further with your test, check the new changes</div><div class=""><br class=""></div><div class="">There are new changes in <a href="http://code.vtiger.com/vtiger/vtigercrm/commit/f630425f8fbe9f1986830b7e5900e4c138827bce" class="">http://code.vtiger.com/vtiger/vtigercrm/commit/f630425f8fbe9f1986830b7e5900e4c138827bce</a></div><div class=""><a href="http://code.vtiger.com/vtiger/vtigercrm/commit/2a89391c30e23600dab5367e83337a60d2eb8e8d" class="">http://code.vtiger.com/vtiger/vtigercrm/commit/2a89391c30e23600dab5367e83337a60d2eb8e8d</a></div><div class=""><br class=""></div><div class="">This will break first email send to user when portal is enabled at first time user is created.</div><div class=""><br class=""></div><div class="">“</div><div class=""><p class="">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.</p><p class="">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.</p><p class="">'fieldname' => 'email',
'operation' => 'has changed',</p><p class="">AND</p><p class="">'fieldname' => 'email',
'operation' => 'is not empty',</p><div class="">“</div></div><div class=""><br class=""></div><div class="">In resume, you need to change email address and change it back to send welcome email</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Best Regards.</div><div class=""><br class=""></div><div class="">Manuel</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">No dia 29/09/2016, às 11:19, Alan Lord <<a href="mailto:alanslists@gmail.com" class="">alanslists@gmail.com</a>> escreveu:</div><br class="Apple-interchange-newline"><div class=""><div class="">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.<br class=""><br class="">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...<br class=""><br class="">The call gets to vtiger OK but no email is ever sent to the user:<br class=""><br class=""><br class=""><blockquote type="cite" class="">Thu Sep 29 09:56:23 2016,893 [6578] INFO VT - PearDatabase ->ADODB disconnect<br class="">Thu Sep 29 09:56:23 2016,958 [6578] DEBUG VT - Entering customer portal function getPortalUserid<br class="">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<br class="">Thu Sep 29 09:56:23 2016,959 [6578] DEBUG user - Entering Users() method ...<br class="">Thu Sep 29 09:56:23 2016,959 [6578] DEBUG VT - Entering getColumnFields(Users) method ...<br class="">Thu Sep 29 09:56:23 2016,959 [6578] DEBUG VT - in getColumnFields Users<br class="">Thu Sep 29 09:56:23 2016,959 [6578] DEBUG VT - Prepared sql query being executed : SELECT tabid, name, ownedby FROM vtiger_tab<br class="">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<br class="">                FROM vtiger_field WHERE tabid in (?)<br class="">Thu Sep 29 09:56:23 2016,964 [6578] DEBUG VT - Prepared sql query parameters : [29]<br class="">Thu Sep 29 09:56:23 2016,975 [6578] DEBUG VT - Exiting getColumnFields method ...<br class="">Thu Sep 29 09:56:23 2016,975 [6578] DEBUG user - Exiting Users() method ...<br class="">Thu Sep 29 09:56:23 2016,978 [6578] DEBUG customerportal - Entering customer portal function send_mail_for_password<br class="">Thu Sep 29 09:56:23 2016,978 [6578] INFO VT - PearDatabase ->Inside the function send_mail_for_password(<a href="mailto:alan@hidden.co.uk" class="">alan@hidden.co.uk</a>).<br class="">Thu Sep 29 09:56:23 2016,979 [6578] DEBUG customerportal - Prepared sql query being executed : select * from vtiger_portalinfo  where user_name = ?<br class="">Thu Sep 29 09:56:23 2016,979 [6578] DEBUG customerportal - Prepared sql query parameters : [<a href="mailto:alan@hidden.co.uk" class="">alan@hidden.co.uk</a>]<br class="">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 =?<br class="">Thu Sep 29 09:56:23 2016,980 [6578] DEBUG customerportal - Prepared sql query parameters : [<a href="mailto:alan@hidden.co.uk" class="">alan@hidden.co.uk</a>]<br class="">Thu Sep 29 09:56:23 2016,983 [6578] DEBUG customerportal - Prepared sql query being executed : SELECT * FROM vtiger_tab<br class="">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<br class="">Thu Sep 29 09:56:24 2016,007 [6578] DEBUG customerportal - Prepared sql query being executed : select * from vtiger_systems where server_type=?<br class="">Thu Sep 29 09:56:24 2016,007 [6578] DEBUG customerportal - Prepared sql query parameters : [email]<br class="">Thu Sep 29 09:56:24 2016,044 [6578] INFO VT - PearDatabase ->Exit from send_mail_for_password. false@@@<b></b><br class="">Thu Sep 29 09:56:24 2016,044 [6578] DEBUG customerportal - Exiting customer portal function send_mail_for_password<br class=""></blockquote><br class="">In the function above I see the comment:<br class=""><br class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>// We no longer have the original password!<br class=""><span class="Apple-tab-span" style="white-space:pre">    </span>if (!empty($adb->query_result($res, 0, 'cryptmode'))) {<br class=""><span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>$password = '*****';<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>// TODO - we need to send link to reset the password<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>// For now CRM user can do the same.<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span>}<br class=""></blockquote><br class="">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.<br class=""><br class="">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.<br class=""><br class="">Has anyone tested this before?<br class=""><br class="">Thanks<br class=""><br class="">Al<br class=""><br class=""><br class="">What is this function supposed to do?<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class=""><a href="http://www.vtiger.com/" class="">http://www.vtiger.com/</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>