fixed PHP notice

This commit is contained in:
Roland Gruber 2018-04-14 16:33:10 +02:00
parent ff4a77a738
commit 5b578cee53
1 changed files with 3 additions and 5 deletions

View File

@ -1,10 +1,9 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2009 - 2012 Pavel Pozdnyak Copyright (C) 2009 - 2012 Pavel Pozdnyak
2009 - 2017 Roland Gruber 2009 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -1148,9 +1147,8 @@ class asteriskAccount extends baseModule implements passwordService {
*/ */
public static function buildPasswordString(&$attributes, &$moduleSettings, $password) { public static function buildPasswordString(&$attributes, &$moduleSettings, $password) {
$astRealm = asteriskAccount::ASTERISK_DEFAULT_REALM; $astRealm = asteriskAccount::ASTERISK_DEFAULT_REALM;
$asteriskRealmFromProfile = $moduleSettings['asteriskAccount_AsteriskRealm'][0]; if (!empty($moduleSettings['asteriskAccount_AsteriskRealm'][0])){
if ($asteriskRealmFromProfile != ""){ $astRealm = $moduleSettings['asteriskAccount_AsteriskRealm'][0];
$astRealm = $asteriskRealmFromProfile;
} }
return asteriskAccount::hashPassword($attributes['AstAccountCallerID'][0] . ":" . $astRealm . ":" . $password); return asteriskAccount::hashPassword($attributes['AstAccountCallerID'][0] . ":" . $astRealm . ":" . $password);
} }