Forums / Suggestions / Reissuing system for the activation mail

Reissuing system for the activation mail

Author Message

Guillaume Kulakowski

Tuesday 19 August 2008 9:26:56 am

Hello,

Currently, there is not a reissuing system for the activation mail.

Why not use the forgotpassword function for activate account after mail validation?

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Guillaume Kulakowski

Tuesday 19 August 2008 2:51:38 pm

A little patch for view :

diff -up ./kernel/user/forgotpassword.php.fix ./kernel/user/forgotpassword.php
--- ./kernel/user/forgotpassword.php.fix	2007-12-03 22:51:20.000000000 +0100
+++ ./kernel/user/forgotpassword.php	2008-08-19 23:48:44.000000000 +0200
@@ -58,12 +58,18 @@ if ( strlen( $hashKey ) == 32 )
         $passwordConfirm = $password;
 
         $userToSendEmail = $user;
-        $user->setInformation( $user->id(), $user->attribute( 'login' ), $email, $password, $passwordConfirm );
+        $userID = $user->id();
+        $user->setInformation( $userID, $user->attribute( 'login' ), $email, $password, $passwordConfirm );
 
+        /* Use forgotpassword for a reissue activation mail */
+        $userSetting = eZUserSetting::fetch( $userID );
+        $userSetting->setAttribute( 'is_enabled', 1 );
+    
         $db = eZDB::instance();
         $db->begin();
 
-        $user->store();
+        $user->store();
+        $userSetting->store();
 
         require_once( "kernel/common/template.php" );
         //include_once( 'lib/ezutils/classes/ezmail.php' );

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Guillaume Kulakowski

Thursday 21 August 2008 3:20:12 am

I have open a bug for that : http://issues.ez.no/IssueView.php?Id=13522&activeItem=1

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"