<UpdateUser>

New to Version 4.0! The UpdateUser tag will register a user in the DNN site and optionally add that user to one or more DotNetNuke security roles after the form has been successfully submitted.

IMPORTANT: You MUST take care to properly validate user input. Additionally you should place this tag only on forms that are properly secured so that only users you intend to have access can use the form.

Syntax

<UpdateUser
    Approved="True|False"
    City="string"
    Country="string"
    DisplayName="string"
    Email="string"
    ErrMsgUserNotFound="string"
    ErrMsgInvalidPassword="string"
    ErrMsgOther="string"
    FirstName="string"
    LastName="string"
    NewPassword="string"
    OldPassword="string"
    PostalCode="string"
    Region="string"
    Street="string" 
    Telephone="string"
    Unit="string"
    UpdatePasswordOnNextLogin="True|False"
    UserId="integer"> 
      (NOTE: Property tags are optional)
      <Property Name="string" Value="string" />
      ...Additional Property Tags as needed...
</UpdateUser>
 

Remarks

 

Back to top

Example
<AddForm>

  <SelectCommand CommandText="SELECT @UserId AS UserId">
     <Parameter Name="UserId" Value='[[User:ID]]' DataType="Int32" DefaultValue="-1"/>
   </SelectCommand>

  <UpdateUser Email='[[Email]]'

      FirstName='[[FName]]' LastName='[[LName]]' UserId='[[UserId]]' />
  <table>
    <tr>
      <td>
         <Label For="txtFirstName" Text="First Name" />
         <TextBox Id="txtFirstName" DataField="FName" DataType="string" />
        <Validate Type="Required" Target="txtFirstName" Text="**" Message="First Name is required." />
       </td>
    </tr>
    <tr>
      <td>
        <Label For="txtLastName" Text="Last Name" />
        <TextBox Id="txtLastName" DataField="LName" DataType="string" />
        <Validate Type="Required" Target="txtLastName" Text="**" Message="Last Name is required." />
      </td>
    </tr>
    <tr>
      <td>
        <Label For="txtEmail" Text="Email" />
        <TextBox Id="txtEmail" DataField="Email" DataType="string" />
        <Validate Type="Required" Target="txtEmail" Text="**" Message="An email address is required." />
        <Validate Type="Email" Target="txtEmail" Text="**" Message="Please enter a valid email address." />
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <AddButton Text="Add"/> <CancelButton Text="Cancel"/>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <ValidationSummary DisplayMode="BulletList" HeaderText="Errors:" CssClass="NormalRed" />
      </td>
    </tr>
  </table>
   <TextBox Id="txtUserId" Visible="False" DataField="UserId" DataType="Int32" />
</AddForm>
Back to top