title: change admin view to user view based on the form variable sent to application cfc file in coldfusion and angular js
body: <p>I have these files:</p>
  
  <pre><code>Application.cfc:
       Onrequeststart method:
            session.remoteuser = cgi.REMOTE_USER
  </code></pre>
  
  <p>Based on the this user, the view is:
      Admin view
     or
      user view</p>
  
  <p>I have index.cfm</p>
  
  <pre><code> &lt;div ng-app controller&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Angular code replaces the view here. </p>
  
  <p>But from admin view i want to create a form which changes the <code>session.remoteuser</code> to any user they want to view as. I created a form in <code>adminview.cfm</code> page and checking to see if the form is submitted in <code>application.cfc</code>. But I see <code>application.cfc</code> is fired twice so the view is getting the user id, but goes back to admin id. How do I achieve this ?</p>