[TYPO3] sr_feuser_register, md5 password

Robert Markula robert.markula at gmx.net
Mon May 12 16:22:08 CEST 2008


Ralica Sotirova wrote:
> Hi, Ro
> Thanks for your answer. I found this http://bugs.typo3.org/view.php?id=8011
> in the bugtracker.
> Sure, I enabled MD5 passwords, and I'm  actually using the example template.
> For me everything works now with this added in
> EXT/sr_feuser_register/model/class.tx_srfeuserregister_data.php
> 
>  if ($cmdKey == 'create' && $this->controlData->getUseMd5Password()) {
>  $parsedArray['password'] = md5($this->getDataArray('password'));
>  }
> 
> And this added in EXT/newloginbox/pi1/class.tx_newloginbox_pi1.php in hook
> section, sends forgot password e-mail.
> 
> $temp_chars = "23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
> $i = 0;
> $temp_password = "";
> while ($i <= 6) {
> $temp_password .= $temp_chars{mt_rand(0,strlen($temp_chars))};
> $i++;
> }
> $temp_md5_password = md5($temp_password);
> $temp_values = array("password" => $temp_md5_password );
> $temp_where = 'uid=' . $row['uid'];
> $res_temp =
> $GLOBALS['TYPO3_DB']->exec_UPDATEquery('fe_users',$temp_where,$temp_values);
> $msg = sprintf($this->pi_getLL('forgot_password_pswmsg', '', 0),
> $workingData['forgot_email'], $row['username'], $temp_password );
> 
> I know it's not beautiful, but my php coding is even worst than my english,
> sorry for that :)
> 
> Thanks!
> Larry

Hi Larry,
Good that you found the solution to your problem. And thanks for sharing
this with this newsgroup!

Cheers,
Robert


More information about the TYPO3-english mailing list