Skip to content

Commit

Permalink
Fixed Password Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Wartner committed Aug 25, 2016
1 parent 04638e8 commit 19a7300
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 224 deletions.
2 changes: 1 addition & 1 deletion .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/libraries/phpmap_node_modules.xml

This file was deleted.

1 change: 0 additions & 1 deletion .idea/phpmap.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

332 changes: 148 additions & 184 deletions .idea/workspace.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/Http/Controllers/Api/Users/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Http\Controllers\Api\Users;

use App\User;
use Illuminate\Http\Request;

use App\Http\Requests;
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
User::created(function ($user) {
if ($user->github_id != null) {
if ($user->github_id == null) {
Mail::to($user)
->queue(new UserRegisteredMail($user));
}
Expand Down
40 changes: 20 additions & 20 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions database/factories/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'address' => $faker->streetAddress,
'city' => $faker->city,
'country' => $faker->country,
'github_id' => str_random(3),
'avatar' => 'https://www.gravatar.com/avatar/04d24379cd970b7670ee66fa203d646f?s=80&r=any&default=identicon&forcedefault=1',
'password' => bcrypt(str_random(10)),
'remember_token' => str_random(10),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function up()

$table->boolean('is_admin')->default('0');

$table->string('github_id')->unique();
$table->string('github_id')->unique()->nullable();

$table->string('lat')->nullable();
$table->string('lng')->nullable();
Expand Down
4 changes: 2 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@


Route::get('/test', function () {
// $users = factory(\PHPMap\User::class, 10)->create();
$users = factory(\App\User::class, 10)->create();

return auth()->user()->followers;
//return auth()->user()->followers;
// return str_random(20).'.'.str_random(5).'_'.str_random(15);

// $user = \PHPMap\User::findByUsername('fwartner');
Expand Down

0 comments on commit 19a7300

Please sign in to comment.