6.0.0-git
2021-01-18

[#8877] Can not change mail address if confirmation is needed
Summary Can not change mail address if confirmation is needed
Queue Horde Base
Queue Version 3.3.6
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester sebastian.radish (at) gmx (dot) de
Created 2010-02-18 (3987 days ago)
Due
Updated 2010-10-20 (3743 days ago)
Assigned
Resolved 2010-03-17 (3960 days ago)
Milestone
Patch No

History
2010-10-20 15:41:32 CVS Commit Comment #6 Reply to this comment
2010-10-20 14:47:55 sebastian (dot) radish (at) gmx (dot) de Comment #5 Reply to this comment
Lol .. just figured out you put me in the changelog. Thanks a lot.

But maybe you want to put my correct name there:
Sebastian Rettenberger
2010-03-17 16:49:20 Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Tweaked and committed, thanks!
2010-03-17 16:48:43 CVS Commit Comment #2 Reply to this comment
Changes have been made in CVS for this ticket:

Allow to update existing identities while requiring email confirmation 
(Sebastian Radish, Bug #8877).
http://cvs.horde.org/diff.php/framework/Prefs/Attic/Identity.php?rt=horde&r1=1.1.2.13&r2=1.1.2.14&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horde&r1=1.515.2.599&r2=1.515.2.600&ty=u
2010-02-18 18:12:47 sebastian (dot) radish (at) gmx (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Can not change mail address if confirmation is needed
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
I have configured Horde so users have exactly one identity and they 
need to confirm there mail address if they want to change it.

The problem is, that after confirmation the old address stays. The 
problem is, that if someone confirms an address the address is ALWAYS 
added as a new identity. I think this is not wanted for multiple 
identities either.

I have written a patch that works for me, but it would probably better 
if someone has a look at it and maybe make it official:
------------------------------------
--- a/horde/lib/Horde/Identity.php      2009-04-30 17:34:28.000000000 +0000
+++ b/horde/lib/Horde/Identity.php      2009-08-02 20:06:56.000000000 +0000
@@ -467,13 +467,18 @@
                  return array(_("Email addresses to confirm not 
found."), 'horde.message');
              } else {
                  $identity = 
$this->_prefs->convertFromDriver($confirm[$hash], NLS::getCharset());
-                $verified = array();
-                foreach ($identity as $key => $value) {
-                    if (!$this->_prefs->isLocked($key)) {
-                        $verified[$key] = $value;
-                    }
-                }
-                $this->add($verified);
+               $id = array_search($identity['id'], $this->getAll('id'));
+               if ($id !== false) {
+                   $this->setValue('from_addr', $identity['from_addr'], $id);
+               } else {
+                    $verified = array();
+                    foreach ($identity as $key => $value) {
+                        if (!$this->_prefs->isLocked($key)) {
+                            $verified[$key] = $value;
+                        }
+                     }
+                     $this->add($verified);
+               }
                  $this->save();
                  unset($confirm[$hash]);
                  $this->_prefs->setValue('confirm_email', 
serialize($confirm), false);

Saved Queries