Keyword

K2 _ users empty

  • Mikael Blomk
  • Mikael Blomk's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122123 by Mikael Blomk
K2 _ users empty was created by Mikael Blomk
Hello,

after moving my website to a new server, I can not login to my Joomla Backend. The table k2_users is empty, when I look into my MySQL database.

How can I insert a new admin user via MySQL into this table? Or can I do something else?

Do you have any ideas?

Thank you!

Mik

Please Log in or Create an account to join the conversation.

  • olsen
  • olsen's Avatar
  • Offline
  • Elite Member
  • Joomla and K2 Freelancer
More
10 years 9 months ago - 10 years 9 months ago #122124 by olsen
Replied by olsen on topic Re: Limit Number of Articles per user
Hi,
Try this.

first execute this SQL command to add a new user to the users table
INSERT INTO `#_users`(`name`, `username`, `email`, `password`,  `block`, `sendEmail`, `registerDate`, `activation`) VALUES ('newadmin','newadmin','[email protected]','433903e0a9d6a712e00251e44d29bf87:UJ0b9J5fufL3FKfCc0TLsYJBh2PFULvT','0','1','2013-12-15 00:00:00','0')

Write down the new user id created and then we add that user to the mapping table where assign it to the admin user group, by default id = 8. Change XX for the user id created.
INSERT INTO `#_user_usergroup_map`(`user_id`, `group_id`) VALUES ('XX','8')


Remember to change the #_ value for the prefix used in your joomla DB in both querys.

After that you can access with the following data:
user: newadmin
pass: admin

Hope it helps
Regards

Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details

Please Log in or Create an account to join the conversation.

  • Mikael Blomk
  • Mikael Blomk's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122125 by Mikael Blomk
Replied by Mikael Blomk on topic Re: Limit Number of Articles per user
Dear Olsen,

thank you for your answer. Unfortunately it is not working. When I want to login I get the message that I don't have access to the administration area of this website.

When I try to login with my admin data from my old server, I get the message that the user or the password is wrong or that this user does not exist...
:( Do you have any other ideas?

Thank you!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122126 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Limit Number of Articles per user
Do you have a backup of your old DB?

You can try either restoring an older backup or moving the user related DB tables.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mikael Blomk
  • Mikael Blomk's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122127 by Mikael Blomk
Replied by Mikael Blomk on topic Re: Limit Number of Articles per user
Yes I have, but after the import, the user tables are empty. I created a new Joomla User, but with this user I even can't log in. I think I have to set up a k2 user manually into the database...

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122128 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Limit Number of Articles per user
Open the old DB first to check if these tables are empty as well before entering new users.
It is important that you maintain the same DB structure.

PS. You will have to update your K2 items if they do no have an author. Which in this case applies to all of your items, since your DB does not have any users.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mikael Blomk
  • Mikael Blomk's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122129 by Mikael Blomk
Replied by Mikael Blomk on topic Re: Limit Number of Articles per user
I don't know why, but the user table of the old database is empty. I don't have access to the old database anymore, so I have to deal with this situation :( The website is running, but I can not login :-/

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122130 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Limit Number of Articles per user
Well that's a sticky situation indeed.
You can try backing up and then importing the user tables ( xx_users, xx_usergroups etc)
from a new Joomla! installation.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • olsen
  • olsen's Avatar
  • Offline
  • Elite Member
  • Joomla and K2 Freelancer
More
10 years 9 months ago - 10 years 9 months ago #122131 by olsen
Replied by olsen on topic Re: Limit Number of Articles per user
If you run those querys correctly a new user should be created and you gain access to your joomla administration.

Just saying, Did you check if is set the right DB in your configuration.php file?? Maybe you are trying to edit the wrong DB.

Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details

Please Log in or Create an account to join the conversation.

  • Mikael Blomk
  • Mikael Blomk's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122132 by Mikael Blomk
Replied by Mikael Blomk on topic Re: Limit Number of Articles per user
Your ideas did not work either :(

But now I inserted public $root_user='admin'; into the last row of the configuration.php

Now I can login with the emergency mode. I created a new super user, but when I log out and delete the root_user row from the config and want to login with this new super user (or the old one from the emergency mode) it doesn't work.

I have no idea what's going on here :(

Do you have some other ideas?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum