Skip to content

Updating online users #1

Description

@jmarkling

Hi

I have one simple question, how to update a users roles when he is aldready login...
I want to update a users role on the fly:
Something like this:

... check user
var roles = new List();
roles.Add("NormalUser");
roles.Add("CreateOffer");
var currentUser = User.Identity.GetUserId();
await UserManager.AddToRolesAsync(currentUser, roles: roles.ToArray());

The problem is that I can only regonize with the new role after he has sign out and in again, how can I update the current user?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions