]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - misc/user-lookup-misc.php
various: Check variable existence
[irc/unrealircd/unrealircd-webpanel.git] / misc / user-lookup-misc.php
index 210e701f77f0eac6f0beee328f9b44a1daffffe3..6f25af7e6400c5329f54f70845f4b493762fca6e 100644 (file)
@@ -74,7 +74,10 @@ function generate_html_usersettings($user)
                                     <table class="table-sm table-responsive caption-top table-hover">
                                         <tr>
                                             <td>Oper Login</td>
-                                            <td><code><?php echo htmlspecialchars($user->user->operlogin); ?></code></td>
+                                            <td><code><?php
+                                            $operlogin = (isset($user->user->operlogin)) ? $user->user->operlogin : "";
+                                             echo htmlspecialchars($operlogin); 
+                                             ?></code></td>
                                         </tr>
                                         <tr>
                                             <td>Oper Class</td>
@@ -177,7 +180,10 @@ function generate_html_usersettings($user)
                                 <table class="table-sm table-responsive caption-top table-hover">
                                         <tr>
                                             <td>Cipher</td>
-                                            <td><code><?php echo htmlspecialchars($user->tls->cipher); ?></code></td>
+                                            <td><code><?php
+                                                $cipher = (isset($user->tls->cipher)) ? $user->tls->cipher : "";
+                                                echo htmlspecialchars($cipher);
+                                            ?></code></td>
                                         </tr>
                                         <tr>
                                             <td>Cert Fingerprint</td>