This project is read-only.

Remove Change Password Link

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Jan 21, 2010 at 7:39 PM

Hi All

I need to remove the Change password link for normal users.

Please help me.


Bobin Sondhi

Jan 23, 2010 at 7:43 AM

In the "Administration" widget, you can set it up so Change Password is only shown for Administrators.

In the ADMIN folder, there's a page named menu.ascx.cs.  In there is this code:

if (!Request.RawUrl.ToUpperInvariant().Contains("/ADMIN/"))
    AddItem(Resources.labels.changePassword, Utils.RelativeWebRoot + "login.aspx");

.... change that to ....

if (Page.User.IsInRole(BlogSettings.Instance.AdministratorRole) && !Request.RawUrl.ToUpperInvariant().Contains("/ADMIN/"))
    AddItem(Resources.labels.changePassword, Utils.RelativeWebRoot + "login.aspx");

(the new part is bolded)