Users ready

This commit is contained in:
2017-12-29 14:44:18 +01:00
parent f73e20d0bc
commit cb0567d3f3
32 changed files with 1298 additions and 201 deletions
+9 -4
View File
@@ -47,18 +47,23 @@ class User extends BaseModel {
public static function saveUser( $userID, $user )
{
$user = (array)$user;
if( $userID == 0)
{
$user = User::create($user);
}
else
{
$user = User::whereId($userID);
$user->update($user);
$user = User::whereId($userID)->update($user);
}
return $user->id;
return $user['id'];
}
public static function removeUser($userID)
{
User::whereId($userID)->delete();
}