Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...updated 7.4.2 to 8.0 released recomendatedupdated 7.4.2 to 8.0 released recomendated
Previous
 
Next
New Post
3/7/2016 8:30 AM
 

To turn a regular user into an admin user you need to make him member of the Administrators role.
You need to lookup userid from Users table. Assuming the PortalID of your website is 0, the statement would be:

DECLARE @UserID = {enter your userID here};
INSERT INTO UserRoles (UserID, RoleID, Status, isOwner, ExpiryDate, EffectiveDate, IsTrialUsed, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate)
SELECT @UserID, RoleID, 1, 0, Null, Null, 1, -1, getDate(), -1, GetDate() FROM Roles WHERE PortalID = 0 AND RoleName Like N'Administrators';

You need to restart your DNN website for this change to become effective.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/7/2016 11:16 AM
 

My userId=2

I write this in DB

DECLARE @UserID = {2};

INSERT INTO UserRoles (UserID, RoleID, Status, isOwner, ExpiryDate, EffectiveDate, IsTrialUsed, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate)

SELECT @UserID, RoleID, 1, 0, Null, Null, 1, -1, getDate(), -1, GetDate() FROM Roles WHERE PortalID = 0 AND RoleName Like N'Administrators';

 

But show a error in your consult in DB:

 

Mens. 102, Nivel 15, Estado 1, Lnea 1

Sintaxis incorrecta cerca de '='.

Mens. 137, Nivel 15, Estado 2, Lnea 3

Debe declarar la variable escalar "@UserID".

 

 
New Post
3/7/2016 12:18 PM
 

nothing.... I do like you said me...

DECLARE @UserID INT = 2;

INSERT INTO UserRoles (UserID, RoleID, Status, isOwner, ExpiryDate, EffectiveDate, IsTrialUsed, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate)

SELECT @UserID, RoleID, 1, 0, Null, Null, 1, -1, getDate(), -1, GetDate() FROM Roles WHERE PortalID = 0 AND RoleName Like N'Administrators';

-------------------------------------------

Now when i try to login with user Admin said me again the problem and not let me go to panel Admin...

http://guijarroconsultores.com/Default.aspx?tabid=92&error=An%20unexpected%20error%20has%20occurred&content=0

 I am so angryyyy i need help because i can´t to do something like créate more module or write more inside.

 

I don´t know if this is a problem... said tabid=92... i search in table tabmoduleid and i see that tabid92 is bannerpanel, i copy/paste this row here.

TabModuleID TabID ModuleID PaneName ModuleOrder CacheTime Alignment Color Border IconFile Visibility ContainerSrc DisplayTitle DisplayPrint DisplaySyndicate IsWebSlice WebSliceTitle WebSliceExpiryDate WebSliceTTL CreatedByUserID CreatedOnDate LastModifiedByUserID LastModifiedOnDate IsDeleted CacheMethod ModuleTitle Header Footer CultureCode UniqueId VersionGuid DefaultLanguageGuid LocalizedVersionGuid
110 92 421 BannerPane 1 1200 NULL NULL NULL NULL 0 NULL 0 0 0 0  NULL 0 1 2015-09-24 12:42:15.090 1 2016-01-08 12:59:27.463 0 MemoryModuleCachingProvider despacho abogados granada, administradores fincas y asesoría fiscal laboral en granada NULL NULL  0C8BDC7D-0B6A-4F3A-87B4-21317CCF0450 945D4E6E-AB35-4C2D-8AE3-B24A7AA98F79 NULL 701793CF-F8CC-407E-B2A2-ED16EA9BA2BC

 

 
New Post
3/7/2016 12:58 PM
 

This is curious... I put this for see a log

select top 100 LogEventID, LogCreateDate, LogTypeKey, LogProperties, StackTrace, InnerStackTrace from dbo.vw_EventLog order by LogEventID desc

and show me that login success, but in the web said error!!!

LogEventID    LogCreateDate    LogTypeKey    LogProperties    StackTrace    InnerStackTrace
167443    2016-03-07 18:53:35.920    LOGIN_SUCCESS    <LogProperties><LogProperty><PropertyName>IP</PropertyName><PropertyValue>192.168.0.26</PropertyValue></LogProperty></LogProperties>    NULL    NULL

 
New Post
3/8/2016 3:21 AM
 
the login itself succeeded, but loading the user data afterwards seem to fail. this might be caused by different user profile properties of host users versus all other users.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...updated 7.4.2 to 8.0 released recomendatedupdated 7.4.2 to 8.0 released recomendated


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out