laravel lost password issue - forms

im making an authentification form where i have to add the lost password form so i found a tutorial that im folowing but im not getting the result
http://culttt.com/2013/09/23/password-reminders-reset-laravel-4/
when i enter teh email and press the button
Route::post('password', function()
{
$credentials = array('email' => Input::get('email'));
return Password::remind($credentials);
});
it says that This super simple method uses Laravel’s input reminder functionality to add the email to the reminder table we created earlier and send the email. You might get an exception saying that you haven’t set up your sender address yet. To fix this, go to app/config/mail.php and fill in the relevant details.
but im getting a view with " reminders.user " can someone help :) thx

You are receiving an INVALID_USER message.
Your lang/reminders.php file is not in place, so it is showing the key 'reminders.user' instead of "We can't find a user with that e-mail address.".

Related

Send a code for password reset via email - Swift + Firebase

I am creating a simple Swift app. I have got the login working with Swift app. Now, when a user clicks on forgot-password, I want to send them an email with a code. Once he enters that code, he can enter a new password.
I looked up at Firebase.auth.auth() I saw functions like checkActionCode() and applyActionCode() - I couldnot understand a clear difference between them!
I also saw some other functions like confirmpasswordReset() and verifyPasswordResetCode().
However, I do not understand what function to use and how to send an email with the code. Can someone give me an overview of how can I do this? Thank you!
If the user forgot their password, you can send them a password reset email with:
Auth.auth().sendPasswordReset(withEmail: email) { (error) in
// ...
}
This email contains so-called OOB code and a link to an auto-generated page that allows them to reset their password. I recommend getting started with this approach, since you'll have to do the least work to get it up and running.
If you want to create your own page instead of the auto-generated one, have a look at the documentation on custom email action handlers. That page also contains an example showing how to call the handleResetPassword, handleRecoverEmail, and handleVerifyEmail methods.

Laravel form validation

What I want to do is to pass current user's id to create a new link that belongs to that user. When I hit submit it keeps showing error message: user id field is required. I think there might be a mistake in my controller action, but can't figure it out.
screen
Try this:
Link::create(array_merge(request(['title', 'address', 'category_title']), ['user_id'=>$user]));

Apache Commons Email work with "normal gmail", but not "Gmail for work"?

Hi I'm using the following code to send email:
public static void sendEmail(String from, String to, String password) {
Email email = new SimpleEmail();
email.setHostName("smtp.googlemail.com");
email.setSmtpPort(465);
email.setAuthenticator(new DefaultAuthenticator(from, password));
email.setSSLOnConnect(true);
email.setSubject("Plain mail");
email.setMsg("test");
email.addTo(to);
email.send();
}
Now, it works when I'm calling this function with my "normal" gmail address:
sendMail("me#gmail.com","friend#gmail.com", "my-password");
So the above works. But when I'm trying to migrate to Gmail for Business, and create an email address "me#mycompany.com" (which is hooked to Gmail), I get an authentication error:
sendMail("me#mycompany.com","friend#gmail.com", "my-new-password");
Gives me this error:
javax.mail.AuthenticationFailedException:
<https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsb...ZlTLN2wQG4>
Please log in via your web browser and then try again.
I suspect I need to set something in my Google Apps console, but I'm not even sure where to start looking for the info.
Can anybody help?
Thanks.
This answer is coming from a similar SO question here.
The issue is due to allowing less secure apps to access your account. Click the following link https://www.google.com/settings/security/lesssecureapps and disable security setting. For more information you can read this here.
Good luck!

Rails omniauth-facebook generate random email

About ten to fifteen percent of my users that attempt to login with facebook are unable to do so. Rails give an "email can not be blank" error when trying to create the user.
I used to get a "password can not be blank" error... but I simply had a random password generated whenever facebook wasn't passing one. So I was wondering if there was a way I could generate a random email whenever facebook fails to pass it on?
It was actually easier than I thought:
user.email = auth.info.email = "#{auth.uid}#facebook.com"
That way it works both ways. If it finds the email from omniauth... then it uses that. If it doesn't find it in omniauth... then it takes the user id... put it in front of "#facebook.com" and VOILA! Not-so-randomly generated email address.

Joomla extension, JomSocial: Removing the welcome email upon registration

On Joomla! 2.5.4 I'm using the JomSocial 2.6.0 extension. Looking for the code that is sending the first registration notification email "welcome email containing username+password" so that I can remove it.
Currently there are two emails sent upon registration, the first which contains the username and password, second that contains the verification link. However I think that having two emails is totally unnecessary.. Thanks!
I found the code from com_community/controllers/register.php
$this->_sendEMail('registration_uncomplete', $tmpUser, $password);
Is it safe or a good idea to just null this?
//$this->_sendEMail('registration_uncomplete', $tmpUser, $password);
$var = NULL;
seems to be working...