Admin kicked out :)

Due to some wrong entry at site administration One of my sites got entangled with another, and then it was lost during a recovery attempt. I fixed things vide Php Admin, and now the site is back. My profile is there, along with the icon, but it is not displayed under Newest Members.

Still worse, I can't login. The site doesn't accept my user name or password. Requests for a new password too don't work, because the site doesn't recognize my name as that of a member. Does MySql contain the Admin name anywhere. Is there anyway I can fix this problem there?

P.S. The biggest problem with Elgg is that mistakes in Site Admin can kill a site. I suggest that the config.php file should record site url and name of Elgg data file, available for editing that would rewrite the files concerned.

 

  • Not sure if this'll help, but all user accounts are held in the user_entity database table.

    You can edit usernames, emails, and if they are an admin or not. The password is also in there, but it is encrypted.

     

    If you want to change your password, you will need the new password you want as well as your account's current salt. The salt can be found in the users_entity table next to your username and password. Once you have the salt and your new password, use this script

    <?php
    $usernamesalt = "SALT"; //Your account's salt. This is found in the database - specifically the users_entity table.
    $password = "PASSWORD"; //Insert desired password in between quotes
    echo "Your encrypted ELGG password:<br/>";
    echo md5($password . $usernamesalt);

    ?>

    to get your desired password. You can then copy paste it in to your account's password in the database.

     

    Do note that ELGG appears to not immediately update user accounts from the users_entity table. Therefore, after making the database changes, you should restart your apache/web server. I do not know if even this will make reload the users_entity table, but it's worth a try.

     

    Good luck!

  • Where I put that script script?

  • Create a new whatever.php file in your elgg root directory, and put that script in it.

  • Untamed, I ran the program and it gave me the same password shown in the users_idendity. The interesting part is the error message I get when I try to login:

    The requested action (login) was not defined in the system.

    All users see the same message! Does that give a clue as to what actually is the problem?

     

  • The system thinks you are missing this file:

    elgg\actions\login.php

    Replace 'elgg' with your root directory/folder.