remove email regex check and restrictions and username for now

pull/2/head
Michael Q Larson 2014-12-01 20:49:08 -08:00
parent eea683f7e3
commit abcf15074b
2 changed files with 5 additions and 4 deletions

View File

@ -3,7 +3,8 @@ var crypto = require('crypto');
var mongoose = require('mongoose');
var userSchema = new mongoose.Schema({
email: { type: String, unique: true, lowercase: true, match: /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/ },
//email: { type: String, unique: true, lowercase: true, match: /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/ },
email: String,
password: String,
facebook: String,
@ -20,8 +21,8 @@ var userSchema = new mongoose.Schema({
gender: { type: String, default: '' },
location: { type: String, default: '' },
website: { type: String, default: '' },
picture: { type: String, default: '' },
username: { type: String, default: '', unique: true, match: /^[a-zA-Z0-9_]+$/ }
picture: { type: String, default: '' }
//username: { type: String, default: '', unique: true, match: /^[a-zA-Z0-9_]+$/ }
},
resetPasswordToken: String,

View File

@ -11,7 +11,7 @@ block content
label.col-sm-2.control-label(for='name') Name
.col-sm-4
input.form-control(type='text', name='name', id='name', value='#{user.profile.name}')
.form-group
//.form-group
label.col-sm-2.control-label(for='username') Username
.col-sm-4
input.form-control(type='text', name='username', id='username', value='#{user.profile.username}')