Sorry … I guess I should have mentioned that I’m using WordPress v.4.1.1 and BuddyPress v.2.2.1
The site URL is: http://mylifeismymuseum.eu/mlimm/activity/ and that I have tested with several different themes.
So asking again … I’ve found that, if a site member clicks the ‘Log In’ button without first entering their username and password, the page redirects to the default WordPress login page (/wp-login.php)
How (and where) might I modify the code so that, instead, it simply fails or, better, displays a an error message to remind the user to fill in their login credentials?
@hutchison
The only thing that comes top off my head is having another wp-login.php
Rename the original wp-login.php as wp-login-backup.php using ftp or cpanel.
Upload in its place another wp-login.php with just the following in it
<meta http-equiv="refresh" content="0; URL=http://mylifeismymuseum.eu/mlimm/activity/">
Please note this is not the recommended way, and I am no coder and have no time and energy and sufficient money to mend wp+bp’s many strange things which do not suit us, just some quick fixes which I personally need also, as I have to build and look after a site, its contents and *users* and thus cannot wait for eternity 🙂
Use this at your own risk, if it works at all for you. Thanks for pointing this. Please click my profile and have a look at the unanswered questions, if you have some time please answer. If no time and no answer, no problem at all 🙂
Thanks very much for the suggestion! that looks like that ought to work, even if not the most elegant solution which, I suspect, is something like a final ‘else’ statement like this:
else{
$return[‘result’] = false;
$return[‘error’] = __(‘Oops! you forgot your username and password.’, ‘bp-login-widget’);
}
$return[‘action’] = ‘login’;
which I tried but, I guess, is not quite right.
That statement can be put in the new wp-login.php
<meta http-equiv="refresh" content="3; URL=http://mylifeismymuseum.eu/mlimm/activity/">
<pre> <!---as much space you want--> Oops! you forgot your username and password. Please login again </pre>
Although this is not elegant or a proper way of doing things.
Thanks for that, @rosyteddy — that seems a very viable solution.
@hutchison Sorry, that will not work !
Instead, find the following in wp-login.php (approx line 219)
<p id="backtoblog">
Replace it with
<p id="backtoblog"><meta http-equiv="refresh" content="0; URL=http://mylifeismymuseum.eu/mlimm/activity/">
Thanks.
Thanks, @rosyteddy, I’ll try that. But at the same time I’m also looking at alternative sidebar login plugins. I’ll let you know if I find a good alternative (viz. link to full registration form + doesn’t display WP admin bar)
@rosyteddy, I found that the quickest, easiest, and most efficient solution was to substitute a different login widget. This one I found really works perfectly for me:
https://wordpress.org/plugins/sidebar-login/
Many thanks, nonetheless, for your ongoing support and advice.