I am trying to create portal user by using:
Site.createPortalUser(u, account.Id,'Sep@2012',true);
method.
But i am getting the type exception:
"System.TypeException: You are already logged in".
I am testing with system admin profile. Could any one please suggest what to do to resolve the issue.