<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Can not change mail address if confirmation is needed</title> 
  <pubDate>Fri, 10 Apr 2026 18:48:30 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8877</link> 
  <atom:link rel="self" type="application/rss+xml" title="Can not change mail address if confirmation is needed" href="https://bugs.horde.org/ticket/8877/rss" /> 
  <description>Can not change mail address if confirmation is needed</description> 
 
   
   
  <item> 
   <title>I have configured Horde so users have exactly one identity a</title> 
   <description>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(_(&quot;Email addresses to confirm not found.&quot;), &#039;horde.message&#039;);
             } else {
                 $identity = $this-&gt;_prefs-&gt;convertFromDriver($confirm[$hash], NLS::getCharset());
-                $verified = array();
-                foreach ($identity as $key =&gt; $value) {
-                    if (!$this-&gt;_prefs-&gt;isLocked($key)) {
-                        $verified[$key] = $value;
-                    }
-                }
-                $this-&gt;add($verified);
+               $id = array_search($identity[&#039;id&#039;], $this-&gt;getAll(&#039;id&#039;));
+               if ($id !== false) {
+                   $this-&gt;setValue(&#039;from_addr&#039;, $identity[&#039;from_addr&#039;], $id);
+               } else {
+                    $verified = array();
+                    foreach ($identity as $key =&gt; $value) {
+                        if (!$this-&gt;_prefs-&gt;isLocked($key)) {
+                            $verified[$key] = $value;
+                        }
+                     }
+                     $this-&gt;add($verified);
+               }
                 $this-&gt;save();
                 unset($confirm[$hash]);
                 $this-&gt;_prefs-&gt;setValue(&#039;confirm_email&#039;, serialize($confirm), false);</description> 
   <pubDate>Thu, 18 Feb 2010 18:12:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8877#t58015</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Allow to upd</title> 
   <description>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&amp;r1=1.1.2.13&amp;r2=1.1.2.14&amp;ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horde&amp;r1=1.515.2.599&amp;r2=1.515.2.600&amp;ty=u</description> 
   <pubDate>Wed, 17 Mar 2010 16:48:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8877#t58213</link> 
  </item> 
   
  <item> 
   <title>Tweaked and committed, thanks!</title> 
   <description>Tweaked and committed, thanks!</description> 
   <pubDate>Wed, 17 Mar 2010 16:49:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8877#t58214</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

MFB: Allow t</title> 
   <description>Changes have been made in Git for this ticket:

MFB: Allow to update existing identities while requiring email confirmation (Sebastian Radish, Bug #8877).

http://git.horde.org/diff.php/framework/Prefs/lib/Horde/Prefs/Identity.php?rt=horde-git&amp;r1=cd624150e5fa2d0f3aa6edcc966d7d588f14a1c9&amp;r2=62b5bb50dca647fc9eea5d6bfbfc43f597574eb8
http://git.horde.org/diff.php/horde/docs/CHANGES?rt=horde-git&amp;r1=6c1bfbb2741e6788db1c8acdfe41e42d0830f212&amp;r2=62b5bb50dca647fc9eea5d6bfbfc43f597574eb8</description> 
   <pubDate>Wed, 17 Mar 2010 17:27:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8877#t58226</link> 
  </item> 
   
  <item> 
   <title>Lol .. just figured out you put me in the changelog. Thanks </title> 
   <description>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</description> 
   <pubDate>Wed, 20 Oct 2010 14:47:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8877#t60482</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Fix name (Bu</title> 
   <description>Changes have been made in CVS for this ticket:

Fix name (Bug #8877).
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horde&amp;r1=1.515.2.630&amp;r2=1.515.2.631&amp;ty=u</description> 
   <pubDate>Wed, 20 Oct 2010 15:41:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8877#t60486</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
