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"

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:14:10
Script start
Timing: Jan 18 2025 04:14:10
Module start 'layout'
Timing: Jan 18 2025 04:14:10
Module start 'content'
Timing: Jan 18 2025 04:14:10
Module end 'content'
Timing: Jan 18 2025 04:14:10
Script end

Main resources:

Total runtime0.0125 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.0469152.6406
Module start 'layout' 0.00520.0020 740.687539.4766
Module start 'content' 0.00720.0035 780.164193.3984
Module end 'content' 0.01070.0018 873.562534.3047
Script end 0.0125  907.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002318.5144140.0002
Check MTime0.00108.2280140.0001
Mysql Total
Database connection0.00097.095210.0009
Mysqli_queries0.001814.735930.0006
Looping result0.00000.079810.0000
Template Total0.001612.410.0016
Template load0.00086.538310.0008
Template processing0.00075.827510.0007
Override
Cache load0.00064.709910.0006
General
dbfile0.00021.370480.0000
String conversion0.00000.047540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs