<RemoveFromRoles>

New to Version 4.0! The RemoveFromRoles tag will remove a user from one or more DotNetNuke security roles after the form has been successfully submitted.

Syntax

<RemoveFromRoles
    RoleNames="comma-delimited list of DNN roles" 
    UserId="integer" 
/>

Remarks

 

Back to top

Example

<AddForm>
  <SubmitCommand CommandText="INSERT INTO Users(FirstName, LastName) VALUES(@FirstName, @LastName)" />
  <RemoveFromRoles RoleNames="Role1,Editors" UserId='[[User:Id]]' />
  <table>
    <tr>
      <td>
         <Label For="txtFirstName" Text="First Name" />
         <TextBox Id="txtFirstName" DataField="FirstName" DataType="string" />
       </td>
    </tr>
    <tr>
      <td>
        <Label For="txtLastName" Text="Last Name" />
                 <TextBoxId="txtLastName" DataField="LastName" DataType="string" />
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <AddButton Text="Add"/> <CancelButton Text="Cancel"/>
      </td>
    </tr>
  </table>
</AddForm>
Back to top