[Tickets #8877] Can not change mail address if confirmation is needed
bugs at horde.org
bugs at horde.org
Thu Feb 18 18:12:47 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8877
------------------------------------------------------------------------------
Ticket | 8877
Created By | sebastian.radish at gmx.de
Summary | Can not change mail address if confirmation is needed
Queue | Horde Base
Version | 3.3.6
Type | Bug
State | Unconfirmed
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
sebastian.radish at gmx.de (2010-02-18 13:12) wrote:
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);
More information about the bugs
mailing list