Skip to content

Commit

Permalink
[mms] Fix using master SMTP credentials when a CLI script uses the 'u…
Browse files Browse the repository at this point in the history
…ser_admin' registry flag.
  • Loading branch information
slusarz committed Sep 9, 2014
1 parent d6fdcf7 commit 7a20f08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions framework/Core/lib/Horde/Core/Factory/Mail.php
Expand Up @@ -99,9 +99,12 @@ public function getConfig()

/* Add username/password options now, regardless of current value of
* 'auth'. Will remove in create() if final config doesn't require
* authentication. */
* authentication. Need isAuthenticated() check since we may be
* running from CLI with 'user_admin' registry flag, which sets
* the authentication name but not the credentials. */
if (strcasecmp($transport, 'smtp') === 0) {
if ($auth = $registry->getAuth()) {
if ($registry->isAuthenticated() &&
strlen($auth = $registry->getAuth())) {
if (!empty($params['username_auth'])) {
$params['username'] = $auth;
}
Expand Down
4 changes: 2 additions & 2 deletions framework/Core/package.xml
Expand Up @@ -39,7 +39,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix using master SMTP credentials when a CLI script uses the &apos;user_admin&apos; registry flag.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -3637,7 +3637,7 @@
<date>2014-09-08</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix using master SMTP credentials when a CLI script uses the &apos;user_admin&apos; registry flag.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 7a20f08

Please sign in to comment.