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
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
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
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) {
$astRealm = asteriskAccount::ASTERISK_DEFAULT_REALM;
$asteriskRealmFromProfile = $moduleSettings['asteriskAccount_AsteriskRealm'][0];
if ($asteriskRealmFromProfile != ""){
$astRealm = $asteriskRealmFromProfile;
if (!empty($moduleSettings['asteriskAccount_AsteriskRealm'][0])){
$astRealm = $moduleSettings['asteriskAccount_AsteriskRealm'][0];
}
return asteriskAccount::hashPassword($attributes['AstAccountCallerID'][0] . ":" . $astRealm . ":" . $password);
}