public static function delete() { $vars = self::get_path_variables(); if (count($vars) == 1) { \lib\user::delete(reset($vars)); } return true; }
public static function post() { if ($user = \lib\user::authenticate($_POST['username'], $_POST['password'])) { $_SESSION['user_id'] = $user['id']; return true; } else { return false; } }
public static function post() { if (\lib\token::match($_POST['token'], 'createuser', $_POST['email'], $_POST['time'], 0)) { // email confirmed \lib\user::confirm($_POST['email']); $user = \lib\user::get($_POST['email'], 'email'); $_SESSION['user_id'] = $user['id']; return true; } else { // email not confirmed // $_POST['']; return false; } }