Last active
July 12, 2018 20:08
-
-
Save muskie9/2c30f6243394d082a08d9c7cb7d44de1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Foo\Bar\Baz; | |
/** | |
* url_handlers/routing would be required for this, could do a page class to reduce that portion of the code | |
*/ | |
class InvitationRedemptionController extends Controller | |
{ | |
public function index($request){ | |
if(!$this->requestHasParams($request)){ | |
//handle case where proper params aren't present | |
} | |
if($this->loginOrUpdateMember($request)){//method to handle login or update logic | |
$this->redirect($request->getVar('YourProductURL')); | |
}else{ | |
//return error message | |
} | |
} | |
//additional supporting methods (requestHasParams(), loginOrUpdateMember(), any other methods you'd need to write) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment