Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...The only thing a user can change is his passwordThe only thing a user can change is his password
Previous
 
Next
New Post
4/3/2007 12:20 PM
 
Hi,

My DNN Portal inherits all it's users from an ERP, and so user master data should not be editable, except for the password. The DNN:User tag creates a link to the user data which allows him to do a lot of stuff. I would like to disable all these options except for password update.

How can I do this? Is there a way to configure DNN to do this?

I was considering creating a direct link to the password page, but this page has a context menu which links to the other options (Profile management, services management, etc).

What are my alternatives? Should I create a specific module for this? Maybe that's the easiest way...

Thanks in advance,
Nuno
 
New Post
4/12/2007 11:31 PM
 

Curious about this as well... We would like users to be able to change contact information (i.e. address, phone, email) but we DON"T want them to change their name.

Thanks.

 
New Post
4/13/2007 5:46 AM
 

Do you know what I ended up doing? I developed a custom module just for this. It was easy and it worked. Let me know if you want the source code.

 
New Post
4/17/2007 5:17 AM
 

Hi,

Can I have a copy of the source code?

Joe

 
New Post
4/17/2007 5:33 PM
 

Of course. Here's the C# code. Please understand that it has specific code for SAP R/3 but I guess you can figure out what is generic:

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Xml;
using System.Web;
using DotNetNuke;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Search;

using WSDL_BAPI_CUSTOMER_CHANGEPASSWO;
using DotNetNuke.Entities.Users;

namespace Farbeira.Modules.PasswordUpdate
{
    public class PasswordUpdateController : UserModuleBase
    {
        UserInfo objUser;

    #region Constructors
        public PasswordUpdateController() {}
    #endregion

    #region Public Methods

        private UserInfo CurrentUser
        {
            get
            {
                if (objUser == null)
                    objUser = UserController.GetCurrentUserInfo();
                return objUser;
            }

        }
        public bool UpdatePassword(string oldPassword, string newPassword)
        {
            if (UpdatePasswordSap(oldPassword, newPassword))
            {
                if (UpdatePasswordDnn(oldPassword, newPassword))
                    return true;
                else
                {
                    UpdatePasswordSap(newPassword, oldPassword);
                    return false;
                }
            }
            else
            {
                return false;
            }
        }

        private bool UpdatePasswordSap(string oldPassword, string newPassword) {

            BAPI_CUSTOMER_CHANGEPASSWORDService service = new BAPI_CUSTOMER_CHANGEPASSWORDService();
            BAPIRETURN bapiReturn;
            string username;

            if (CurrentUser.IsInRole(Globals.RoleClientes))
            {
                username = Globals.SapCustomerNumber;
            }
            else if (CurrentUser.IsInRole(Globals.RoleClientes))
            {
                username = Globals.RoleFornecedores;
            }
            else
            {
                return false;
            }

            bapiReturn = service.BAPI_CUSTOMER_CHANGEPASSWORD(username, newPassword, oldPassword, newPassword);
            return (bapiReturn.TYPE == "I");
        }
        private bool UpdatePasswordDnn(string oldPassword, string newPassword)
        {
            return UserController.ChangePassword(CurrentUser, oldPassword, newPassword);
        }
    #endregion
    }
}

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...The only thing a user can change is his passwordThe only thing a user can change is his password


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out