Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 75508baf

Přidáno uživatelem Marek Lovčí před asi 4 roky(ů)

Merge origin/develop into master

Zobrazit rozdíly:

app/Http/Controllers/Auth/RegisterController.php
3 3
namespace App\Http\Controllers\Auth;
4 4

  
5 5
use App\Http\Controllers\Controller;
6
use App\Mail\RegisterMail;
6 7
use App\Providers\RouteServiceProvider;
7 8
use App\User;
9
use Illuminate\Routing\UrlGenerator;
8 10
use Illuminate\Foundation\Auth\RegistersUsers;
9 11
use Illuminate\Support\Facades\Hash;
12
use Illuminate\Support\Facades\Mail;
10 13
use Illuminate\Support\Facades\Validator;
11 14

  
12 15
class RegisterController extends Controller
......
64 67
     */
65 68
    protected function create(array $data)
66 69
    {
67
        //dd($data);
70
        $stringH = Hash::make($data['email'] . $data['name']);
71
        $vowels = array("/", "\\");
72
        $stringHModified = str_replace($vowels, "", $stringH);
73

  
74
        //Mail::to($data['email'])->send(new RegisterMail("http://localhost/verify/". $stringHModified));
75
        Mail::to($data['email'])->send(new RegisterMail(url("/verify/") . "/" . $stringHModified));//http://localhost/register/verify/..
68 76

  
69 77
        return User::create([
70 78
            'name' => $data['name'],
71 79
            'email' => $data['email'],
72 80
            'password' => Hash::make($data['password']),
81
            'register_hash' => $stringHModified,
73 82
        ]);
74 83
    }
75 84
}

Také k dispozici: Unified diff