public function subscribe() { $keys = array_keys($_GET); $widgetId = $keys[0]; if (!isset($widgetId)) { throw new BadArgumentException(MwwException::CONTROLLER, 'You must provide a widget identifier to subscribe to a widget.'); } if (!Auth::isAuth()) { // forward to the login script. DefaultFC::redirection('users/index?ref=subscribe'); exit; } // No failure for authentication and parameters. We just carry on ! UserInterface::subscribe(Auth::getUserId(), $widgetId); DefaultFC::redirection('wall/index'); }