2.3 MOD: Prevent Users from Changing Name & Email in Profile

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
Lisaweb
Posts: 94
Joined: Sun Sep 25, 2011 3:23 pm

2.3 MOD: Prevent Users from Changing Name & Email in Profile

Post by Lisaweb »

This little modification prevents users from changing their name & email address in their profile settings. (I needed this because I am using piping, and if users accidentally change their user email to an email that is also used the piping, it creates an infinite loop flooding the server with emails (at least that is what happened on my server). You may have other reasons.

In admin/profile.php

Replace this code:

Code: Select all

<td style="text-align:right" width="200"><?php echo $hesklang['name']; ?>: <font class="important">*</font></td>
	<td><input type="text" name="name" size="30" maxlength="50" value="<?php echo $_SESSION['new']['name']; ?>" /></td>
	</tr>
	<tr>
	<td style="text-align:right" width="200"><?php echo $hesklang['email']; ?>: <font class="important">*</font></td>
	<td><input type="text" name="email" size="30" maxlength="255" value="<?php echo $_SESSION['new']['email']; ?>" /></td>
With this code:

Code: Select all

<td style="text-align:right" width="200"><?php echo $hesklang['name']; ?>: <font class="important">*</font></td>
	<td><input type="text" readonly="readonly" name="name" size="30" maxlength="50" value="<?php echo $_SESSION['new']['name']; ?>" /></td>
	</tr>
	<tr>
	<td style="text-align:right" width="200"><?php echo $hesklang['email']; ?>: <font class="important">*</font></td>
	<td><input type="text" readonly="readonly" name="email" size="30" maxlength="255" value="<?php echo $_SESSION['new']['email']; ?>" /></td>
- Lisa
Post Reply