add conditional for view mode

Resolves #830 by checking for the existence of params[:user][:role] before setting params[:user][:view_mode] to it.

Resolved in master on branch 779_rails-4-2