I'm working with both Code Igniter and Ion Auth for the first time. I'd like to change the language in the Ion Auth email templates (password reset, email verification, etc).
This is what appears to be the password reset email template (forgot_password.tpl.php), but I'm not sure where things like 'email_forgot_password_subheading' and 'email_forgot_password_heading' are defined. A Windows search of my local installation doesn't bring up any results. Can you help?
<html>
<body>
<h1><?php echo sprintf(lang('email_forgot_password_heading'), $identity);?></h1>
<p><?php echo sprintf(lang('email_forgot_password_subheading'),
anchor('auth/reset_password/'. $forgotten_password_code,
lang('email_forgot_password_link')));?></p>
</body>
</html>
Those will be in the language file in application/language/english/ion_auth_lang.php
Related
I'm trying to use Google ReCaptcha V3 for my site, but when I load the page always get a message "Invalid site key or not loaded in api.js".
So for the first question, I need to make sure Google Recaptcha V3 can run on the local environment, right? (without SSL)
If it can run, How to verify domain or site key is correct?
HTML&JS
<html lang="en">
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<div class="col-md-4">
<div class="g-recaptcha" data-sitekey="{{env('GOOGLE_RECAPTCHA_KEY')}}"></div>
</div>
</body>
</html>
Screenshot:
Google Recaptcha V3
Please help me :)
You may have to include the sitekey in the script tag itself:
You have: https://www.google.com/recaptcha/api.js
You want: https://www.google.com/recaptcha/api.js?render=<v3_site_key>
Google Recaptcha is not working on localhost. I have used the admin console to create a key just for localhost and I have even disabled domain validation under advanced settings. I still get an error indicating that localhost is not on the list of supported domains. Code is below
in the head tag of HTML
<script src='https://www.google.com/recaptcha/api.js'></script>
In the body tag of HTML
<div class='form-group'>
<div class="g-recaptcha"
datasitekey="6Leefj0UAAAAAAb8CMhdkGZxmVVhKGxMGkUPqB6z"></div>
</div>
The above site key doesn't have domain validation enabled (I have disabled it out of desperation). So anyone should be able to replicate this error using it. How do I get Google Recaptcha to work?
Update This is a bug in Laravel 5.2 & 5.3
I've got a weird one here. A user's email address on our client's system has a domain with the following substring in it '#parent'. I am not including the whole thing just for the sake of privacy.
Because #parent is a Blade directive, Laravel seems to either process or ignore the #parent and strips it out of the rendered email address on the page.
For example, let's say the email address is john#parentstuff.com. Laravel will render the following on the page: johnstuff.com. See how it removes #parent from the email?
What I've tried to fix it:
1. {!! $user->email !!}
2. {{ e($user->email) }}
I know that this is an issue with Blade as AJAX & jQuery rendered content with this same email address is displayed just fine elsewhere on the site.
UPDATE
Upon further investigation, it appears this may be a bug in how Blade processes the #parent directive. I set up 3 new Laravel projects for the following versions: 5.2, 5.3 and 5.4. The project in question is a Laravel 5.2 project, FYI.
I created the following setup for each of the above mentioned versions to test the bug.
Route
Route::get('/test', function () {
$foo = 'john#parentingstuff.org';
return view('test')->with('foo', $foo);
});
Templates
Base
<html>
<head>
<title>App Name - #yield('title')</title>
</head>
<body>
<div class="container">
#yield('content')
</div>
</body>
</html>
Test View
#extends('test-base')
#section('content')
{{$foo}}
#endsection
Outputs
L5.2: johningstuff.org
L5.3: johningstuff.org
L5.4: john#parentingstuff.org
Theories
One very interesting case I noticed while running these tests was that having the {{$foo}} variable inside of a #section directive vs moving it outside of the #section directive led to two different outputs.
Example
{{$foo}}
#section('content')
{{$foo}}
#endsection
The output of this was...
john#parentingstuff.org
johningstuff.org
Conclusion
So, does anyone know how to patch this bug in Laravel 5.2 or Laravel 5.3? Currently, upgrading to L5.4 is not an option for our client.
Anyone have any clever tricks they can think of that might help?
I believe the problem is elsewhere. You are doing probably something more than you wrote.
Sample controller method content
return view('test', ['email' => 'john#parentstuff.com'];
Sample view:
Email is: {{ $email }}
Result is:
Email is: john#parentstuff.com
so I believe you are doing something more than you wrote.
Something very screwy is going on in your setup, because that shouldn't be possible. Laravel processes Blade instructions before interpreting any variables.
I tested with a very simple example:
Route::get('test', function() {
$foo = 'john#parentstuff.com';
return view('test')->with('foo', $foo);
});
and a Blade template of:
{{ $foo }}
and it works just fine. #parent is not interpreted.
This is a bug in Laravel verions prior to 5.4. See the following:
https://github.com/laravel/framework/issues/10068
https://github.com/laravel/framework/pull/16033
This is a bug in Laravel 5.1 too.
A quick solution could be to change the # sign to
#
to fix it.
Hi all our website is Caged.eu and we have customised a Template from pre 1.9. Magento allows customer to register but when they try to sign in using that login details login page doesnt respond, this also happens when they ask to resend password it send reset details but still doesnt work.
Oddly the click facebook link to sign up login does work which is another extension we are ready to release but after getting it this well done would hate to have to change template.
Im sure its something stupid but would really appreciate your help guys
In Magento 1.9 the forms are unable to store the data as formkey missing. Try to add the key then you can be able to sign in. Add <?php echo $this->getBlockHtml('formkey'); ?> this at line no 41 below <form> tag in app/design/frontend/[your theme package]/[your theme]/template/persistent/customer/form/login.phtml
And check whether you can update product quantity in cart, there also formkey is missing.
Copy base/default/template/customer and base/default/template/persistent to your theme/template
After you had added the line <?php echo $this->getBlockHtml('formkey'); ?>
Perhaps you need to to flush magneto cache from magento admin (System->Cache management), then you can try the frontend customer login again.
As already replied in magento.stackexchange you should edit
/app/design/frontend/default/template-name/template/persistent/customer/form/login.phtml
and inside the "login form" form, after the
<ul class="form-list">
you should insert
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
and this will solve your problem, as it did with mine.
Hope this helps
so be it - manemoi
Theodore
i have a redirect.php and a link and it doesn't work in WORDPRESS.
i expect when i click the "hello" link on my site, it goes to redirect.php, the user sees the spinner for 5 secs, and the users exits my site to hello.com
it looks like there is something wrong with mod_rewrite i'm unable to solve
i'd really appreciate a very detailed answers. i am very junior
this what i have.
1.- I have an external link in my homepage:
Hello
2.- In redirect.php, i have:
<html>
<head>
...
<meta http-equiv="refresh" content="5;url=<?php echo $_GET['link'];?>" />
...
</head>
<body>
<h1>You are leaving my site!</h1>
<img src="/images/spinner.gif" alt="spinner" />
</body>
</html>
The link <a href="http://redirect.php?... is incorrect. This should most likely be <a href="/redirect.php?... or any subdirectory on your server.
You should also include the protocol in your link parameter or prepend it in your meta tag. Also make sure to HTML encode the link in your meta tag and to properly URL encode the domain name in your link parameter.
So, change the link to:
Hello
if you have the redirect.php file in the root of your website. And change the meta tag to:
<meta http-equiv="refresh" content="5;url=<?php echo htmlentities($_GET['link'], ENT_QUOTES,);?>" />
And you might want to do some validation on the validity of the link parameter and you possibly also want to check the referrer URL ($_SERVER('HTTP_REFERER')) to make sure you only perform redirects for links from your own website (i.e. don't create an open redirect vulnerability).