Registration Success Message

Permalink
How do I edit the registration success message that appears when someone has completed the C5 site registration form?

The default message is:

"You are registered but a site administrator must review your account, you will not be able to login until your account has been approved."

I just need to make it bold.

This text does not appear in the Register Single page although it is a part of it. So I guess it is dynamically generated, but there doesn't seem to be anywhere in the dashboard to edit it.

Does anyone know how to do this?

thanks in advance.

View Replies: View Best Answer
citytech2 replied on at Permalink Reply
citytech2
Yes it is possible. You just need to go to the controller of the registration page. Go to ROOT/concrete/controllers/register.php & scroll down to the bottom near about Line no 279 (May be different in your case.). Find the function called getRegisterPendingMsg().
And put the strong tag. That's all.

Citytech
olivercoquelin replied on at Permalink Reply
Thanks for your reply. Where exactly do I add the <strong> tags? I have tried:

$redirectMethod='register_pending';
$registerData['msg']=$this-><strong>getRegisterPendingMsg()</strong>;
$u->logout();


And:

$redirectMethod='register_pending';
$registerData['<strong>msg</strong>']=$this->getRegisterPendingMsg();
$u->logout();


Neither of these seem to work.
citytech2 replied on at Permalink Best Answer Reply
citytech2
You have done the changes in wrong place. Just go to the bottom of the pages & find the below code.
public function getRegisterPendingMsg(){
      return t('You are registered but a site administrator must review your account, you will not be able to login until your account has been approved.');
   }


And replace with the below one:
public function getRegisterPendingMsg(){
      return t('<strong>You are registered but a site administrator must review your account, you will not be able to login until your account has been approved.</strong>');
   }


Citytech
olivercoquelin replied on at Permalink Reply
OK thanks!
olivercoquelin replied on at Permalink Reply
Actually this didn't work. I have also tried using HTML bold tags:

public function getRegisterPendingMsg(){
  return t('<b>You are registered but a site administrator must review your account, you will not be able to login until your account has been approved.</b>');
   }


I have also tried wrapping the entire PHP content of the page with an inline style:

<div style="font-weight:bold"><?php 
defined('C5_EXECUTE') or die("Access Denied."); 
etc...
?>
</div>


Does anyone have any ideas how I can make this text bold?
weyboat replied on at Permalink Reply
weyboat
Try this
public function getRegisterPendingMsg(){
  <p style="font-weight:bold">return t('You are registered but a site administrator must review your account, you will not be able to login until your account has been approved.')</p>;
   }


Or this
public function getRegisterPendingMsg(){
  return t('<p style="font-weight:bold">You are registered but a site administrator must review your account, you will not be able to login until your account has been approved.</p>');
   }
olivercoquelin replied on at Permalink Reply
Thanks for your message. Unfortunately neither of these worked.
olivercoquelin replied on at Permalink Reply
I'm still having no success in making this text bold. To test that any changes were happening at all I changed the text slightly and uploaded it. I cleared the site cache and revisited the page but the text had not changed. I'm definitely uploading the register.php file to the correct directory concrete/controllers/. Is it possible that there is a separate file that is controlling this success message? This is really baffling.
olivercoquelin replied on at Permalink Reply
It was! For anyone else's future reference I tried uploading the register.php file to the top level directory /controllers/ instead of /concrete/controllers/ and it worked.