From: kkalev Date: Mon, 12 Aug 2002 21:47:20 +0000 (+0000) Subject: Set a few more personal information attributes to defaults in lib/sql/user_info.php3 X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=dfca4595eb09e8623f8172157c5a56a8d5010902;p=freeradius-dialup-admin.git Set a few more personal information attributes to defaults in lib/sql/user_info.php3 --- diff --git a/Changelog b/Changelog index dce9b53..8c548f4 100644 --- a/Changelog +++ b/Changelog @@ -15,6 +15,7 @@ Ver 1.50: * Print a message if we can't connect to the ldap server in lib/ldap/user_info.php3 * Use a textarea for new members in group_admin.php3 and group_new.php3. Update lib/sql/create_group.php3 and lib/sql/group_admin.php3 +* Set a few more personal information attributes to defaults in lib/sql/user_info.php3 Ver 1.30: * Add limit of results returned in accounting.php3 * Fix a bug in time2strclock() in lib/functions.php3. Seconds ammount more than 9 would not show. diff --git a/lib/sql/user_info.php3 b/lib/sql/user_info.php3 index 3da8cc4..96e2f57 100644 --- a/lib/sql/user_info.php3 +++ b/lib/sql/user_info.php3 @@ -15,14 +15,20 @@ if ($config[sql_use_operators] == 'true'){ } $user_exists = 'no'; +$cn = '-'; $cn_lang = '-'; $homeaddress = '-'; $homeaddress_lang = '-'; $fax = '-'; $url = '-'; +$ou = '-'; $ou_lang = '-'; $title = '-'; $title_lang = '-'; +$telephonenumber = '-'; +$homephone = '-'; +$mobile = '-'; +$mail = '-'; $mailalt = '-'; unset($item_vals); @@ -66,12 +72,12 @@ if ($link){ if (@da_sql_num_rows($res,$config)) $user_exists = 'yes'; if (($row = @da_sql_fetch_array($res,$config))){ - $cn = ($row[Name]) ? $row[Name] : '-'; - $telephonenumber = ($row[WorkPhone]) ? $row[WorkPhone] : '-'; - $homephone = ($row[HomePhone]) ? $row[HomePhone] : '-'; - $ou = ($row[Department]) ? $row[Department] : '-'; - $mail = ($row[Mail]) ? $row[Mail] : '-'; - $mobile = ($row[Mobile]) ? $row[Mobile] : '-'; + $cn = ($row[Name] != '') ? $row[Name] : '-'; + $telephonenumber = ($row[WorkPhone] != '') ? $row[WorkPhone] : '-'; + $homephone = ($row[HomePhone] != '') ? $row[HomePhone] : '-'; + $ou = ($row[Department] != '') ? $row[Department] : '-'; + $mail = ($row[Mail] != '') ? $row[Mail] : '-'; + $mobile = ($row[Mobile] != '') ? $row[Mobile] : '-'; } } }