Invalid Login Message

Permalink Browser Info Environment
Hi,

I would like visitors who supply incorrect credentials to receive the same "Invalid username or password" message that the core login has. Is there a way/workaround to achieve this?

Thanks.

Type: Discussion
Status: New
clovisusd
View Replies:
jb1 replied on at Permalink Reply
jb1
Hi

If any of the login info were incorrect the user should be redirected to the core login form and should be given that same message. Did I answer your question correctly?

JZ
clovisusd replied on at Permalink Reply
clovisusd
Hi,

They are not being redirected. It may be because we created a custom single page login theme, perhaps?

You can see it athttp://www.californiafairschoolfunding.org/login...

I can provide any access, if necessary.

Thank you.
jb1 replied on at Permalink Reply
jb1
Ah yes, it looks like you hard-coded the Register Pro block inside that single page. In that case you'll have to put the do_login function in the controller of your single page.

The original function found in the core login controller is this
public function do_login() {
      $ip = Loader::helper('validation/ip');
      $vs = Loader::helper('validation/strings');
      $loginData['success']=0;
      try {
         if(!$_COOKIE[SESSION]) {
            throw new Exception(t('Your browser\'s cookie functionality is turned off. Please turn it on.'));
         }
         if (!$ip->check()) {
            throw new Exception($ip->getErrorMessage());
         }
         if (OpenIDAuth::isEnabled() && $vs->notempty($this->post('uOpenID'))) {
            $oa = new OpenIDAuth();
            $oa->setReturnURL($this->openIDReturnTo);
            $return = $oa->request($this->post('uOpenID'));


You can try and put that inside your controller.

Hope that helps.

JZ

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.