ResetUserPassword.csp


<%@ Language=JavaScript%>

<!-- #include file="RetrieveIStore.csp" -->

<html>

<body>

<%

    

function ResetPassword(IStore, UserID)

{

    var Users = IStore.Query

    ("SELECT SI_NEW_PASSWORD FROM CI_SYSTEMOBJECTS WHERE SI_PROGID='CrystalEnterprise.USER'"

    + " And SI_ID="+UserID+"");

    // Reset the user's password to NewPassword.

    Users.Item(1).PluginInterface("").NewPassword = "NewPassword";

    IStore.Commit (Users);

}


function Main()

{

    var UserID = Request.QueryString.Item ("UserID");

    IStore = RetrieveIStore();

    if (IStore == null)

    {

        Response.Redirect("Start.csp");

        return;

    }

    ResetPassword(IStore,UserID);

    Response.Write ("The password has been reset.");

}


Main();

    

%>

</body>

</html>




Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com