- Fixed account sign up bug

This commit is contained in:
Dave 2016-02-29 17:38:01 +00:00
parent a3320dd598
commit 798f63fafa
5 changed files with 18 additions and 48 deletions

View File

@ -59,10 +59,6 @@ class Utils
return file_exists(storage_path() . '/framework/down');
}
public static function isProd()
{
return App::environment() == ENV_PRODUCTION;
}
public static function file_upload_max_size() {
static $max_size = -1;

View File

@ -1,9 +1,15 @@
<?php namespace App\Http\Controllers;
use Mail;
use Session;
use Validator;
use Redirect;
use Hash;
use Auth;
use Input;
use View;
use App\Attendize\Utils;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use View, Validator, Redirect, Hash, Auth, Input;
use App\Models\Account;
use App\Models\User;
@ -12,16 +18,17 @@ class UserSignupController extends Controller {
protected $auth;
public function __construct(Guard $auth) {
if(Account::count() > 0 && !Utils::isAttendize()) {
return Redirect::route('login');
}
$this->auth = $auth;
$this->middleware('guest');
}
public function showSignup() {
if(Account::count() > 0 && Utils::isAttendize()) {
return Redirect::route('login');
}
return View::make('Public.LoginAndRegister.Signup');
}

View File

@ -1,34 +0,0 @@
<?php namespace App;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
use Authenticatable, CanResetPassword;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name', 'email', 'password'];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['password', 'remember_token'];
}

View File

@ -1,3 +1,6 @@
**Documentation & Information still under development.**
# Attendize - Event Ticketing & Event Management Application
https://www.attendize.com
@ -45,9 +48,7 @@ offer event organisers a simple solution to managing general admission events.
Coming Soon
## Screen Shots
[Imgur](http://i.imgur.com/xgUprHT.jpg)
### License
Attendize is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
Attendize is open-sourced software licensed under the Attribution Assurance License

View File

@ -120,7 +120,7 @@
</div>
@endif
<a target="__blank"
href="https://connect.stripe.com/oauth/authorize?response_type=code&client_id={{STRIPE_APP_CLIENT_ID}}&scope=read_write&state={{Auth::user()->id}}">
href="https://connect.stripe.com/oauth/authorize?response_type=code&client_id={{$_ENV['STRIPE_APP_CLIENT_ID']}}&scope=read_write&state={{Auth::user()->id}}">
<img src="{{asset('assets/images/stripe-connect-blue.png')}}"
alt="Connect with Stripe"/>
</a>