Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email notifications are not sent if there are any admins with empty email address #1787

Closed
aokunev opened this issue Jun 7, 2017 · 1 comment

Comments

@aokunev
Copy link

aokunev commented Jun 7, 2017

I've updated teampass to 1.27 using git clone method. DB has been updated without issues. Noticed email notifications stopped arriving. During troubleshooting noticed OPV user was created without email address in teampass_users. That code failed to create a list of recipients and invoking @sendmail with empty recipients argument. Attaching a simple patch that fixed the issue, please consider adding to the mainline.

--- /tmp/identify.php 2017-06-05 23:02:57.490778648 -0400
+++ sources/identify.php 2017-06-05 22:40:15.048011210 -0400
@@ -996,7 +996,7 @@
) {
// get all Admin users
$receivers = "";

  •            $rows = DB::query("SELECT email FROM ".prefix_table("users")." WHERE admin = %i", 1);
    
  •            $rows = DB::query("SELECT email FROM ".prefix_table("users")." WHERE admin = %i and email !=''", 1);
               foreach ($rows as $record) {
                   if (empty($receivers)) {
                       $receivers = $record['email'];
    
nilsteampassnet pushed a commit that referenced this issue Jun 8, 2017
Fix for #1787
Several improvements
@nilsteampassnet
Copy link
Owner

Correct.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants