diff --git a/src/IDF/Form/Password.php b/src/IDF/Form/Password.php index 795a539..98b6949 100644 --- a/src/IDF/Form/Password.php +++ b/src/IDF/Form/Password.php @@ -86,7 +86,7 @@ class IDF_Form_Password extends Pluf_Form $return_url = Pluf_HTTP_URL_urlForView('IDF_Views::passwordRecoveryInputCode'); $tmpl = new Pluf_Template('idf/user/passrecovery-email.txt'); $cr = new Pluf_Crypt(md5(Pluf::f('secret_key'))); - $code = trim($cr->encrypt($user->email.':'.$user->id.':'.time()), + $code = trim($cr->encrypt($user->email.':'.$user->id.':'.time().':primary'), '~'); $code = substr(md5(Pluf::f('secret_key').$code), 0, 2).$code; $url = Pluf::f('url_base').Pluf_HTTP_URL_urlForView('IDF_Views::passwordRecovery', array($code), array(), false); diff --git a/src/IDF/Form/UserChangeEmail.php b/src/IDF/Form/UserChangeEmail.php index aa611c0..308bd6e 100644 --- a/src/IDF/Form/UserChangeEmail.php +++ b/src/IDF/Form/UserChangeEmail.php @@ -63,7 +63,7 @@ class IDF_Form_UserChangeEmail extends Pluf_Form throw new Pluf_Form_Invalid(__('The validation key is not valid. Please copy/paste it from your confirmation email.')); } $cr = new Pluf_Crypt(md5(Pluf::f('secret_key'))); - return explode(':', $cr->decrypt($encrypted), 3); + return explode(':', $cr->decrypt($encrypted), 4); }