backend sendRegistration

This commit is contained in:
Lorenzo Giacomelli
2016-03-08 12:20:43 +01:00
parent 17f21e8b0d
commit d1296a1fc7
7 changed files with 106 additions and 11 deletions
+8
View File
@@ -16,6 +16,14 @@ class UserModel extends Model{
if (!$this->hasProperty("email")){
throw new CoreException("Impossible to create a user without a mail address");
}
if (!$this->hasProperty("username")){
throw new CoreException("Impossible to create a user without a username");
}
if(!$this->hasProperty("password")){
new CoreException("Impossible to create a user without a password");
}
}
public static function getCollectionName(){