Not sure if you solved this issue, sa88a, but for anyone else interested, I recently had the same problem when editing my user info directly in the MySQL database. When I changed my password there, I couldn't log onto the Anchor interface!
Here are the steps I went through to get my Anchor user back in and running:
- Click on the "Reset Password" link on the Anchor login screen
- Input your e-mail address there
- If you get an error message about the "From" header not being included in the reset e-mail message, thus resulting in the message not being sent, here's what to do:
a. Open your anchor\routes\admin.php file
b. Go to line 116, and just below the $msg statement (which should be on Line 115), type: $sendemailfrom = _('From: whateveryouremailaddressis.com' . ""); Note: it doesn't really matter what e-mail address you type in for the From field.
c. Go to line 118 (it starts with mail($user...) and make one addition at the very end of the line, so it reads: mail($user->email, $subject, $msg, $sendmail_from);
d. You should be good to go with admin.php. Save, close.
- Go back to the Anchor login screen, select "Reset password" and type in your e-mail address. The message should send via SMTP (port 25 is the default) to your e-mail address. If all goes well and you receive the e-mail in your inbox, just click on the reset URL and you should be able to reset your password easily via that reset URL. Stop right here.
Unfortunately, I ran into another problem here- the reset password e-mail never left my server and did not arrive in my e-mail inbox. But the thing is... we have the ability to read the content of the generated e-mail message from our server logs!
- If you didn't receive an e-mail, let's check your server for the content of that generated e-mail message. Go to wherever your server is running, and go into the \mailspool folder.
- You'll see your e-mail messages there. Just open the content of the most recent message, and then you will be able to copy and paste the Anchor reset URL into your browser. Reset your password, and you should be good to go.