Browse Source

updated to use a default email address from settings when owner is None

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
35c72922fe
  1. 6
      pyweb/mumble/models.py

6
pyweb/mumble/models.py

@ -35,6 +35,8 @@ from django.db import models
from mmobjects import mmServer, mmACL from mmobjects import mmServer, mmACL
from pyweb.settings import DEFAULT_FROM_EMAIL
import dbus import dbus
import socket import socket
@ -168,11 +170,11 @@ class MumbleUser( models.Model ):
self.mumbleid = murmur.registerPlayer( dbus.String( self.name ) ); self.mumbleid = murmur.registerPlayer( dbus.String( self.name ) );
# Update user's registration # Update user's registration
if self.password and self.owner:
if self.password:
murmur.setRegistration( murmur.setRegistration(
dbus.Int32( self.mumbleid ), dbus.Int32( self.mumbleid ),
dbus.String( self.name ), dbus.String( self.name ),
dbus.String( self.owner.email ),
dbus.String( self.owner.email if self.owner else DEFAULT_FROM_EMAIL ),
dbus.String( self.password ) dbus.String( self.password )
); );

Loading…
Cancel
Save