title: Managing profile members dataset in wix, to add when text being clicked email in an other category
body: <p>i was trying to create once logged in the website a function onClick() in the member area. When text clicked would let add the user email in another role and enable user to other functions. I've tried with the code below, but it's not adding user email to the other role(ideas to fix it?). However, what's your opinion? maybe it could be better to let two different types of log in/register when in registration phase? (If answer is yes, how could i do that?)</p>
  <pre><code>`import wixUsers from 'wix-users';
   import {roles} from 'wix-users-backend';
  export function text67_click(event) {
      /* This function was added from the Properties &amp; Events panel. To learn 
  more, visit http://wix.to/UcBnC-4 */
      // Add your code for this event here: 
      function getUser(loginEmail){this}
      function assignRole(consulente, loginEmail) {
    return roles.assignRole(consulente, loginEmail, { suppressAuth: false })
      .then( () =&gt; {
        console.log(&quot;Role assigned to member&quot;);
      })
      .catch((error) =&gt; {
        console.log(error);
      });
      }
  
  
  }`
  </code></pre>
  <p>Thanks in advance, for your opinions</p>