Created
December 16, 2011 04:06
-
-
Save fititnt/1484414 to your computer and use it in GitHub Desktop.
Exemplo de como obter variaveis depois do cadastro de um usuario
This file contains 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 | |
// Plugin do tipo user | |
// No direct access | |
defined('_JEXEC') or die('Restricted access'); | |
jimport('joomla.plugin.plugin'); | |
class plgUserNomedoplugin extends JPlugin { | |
/** | |
* Utility method to act on a user after it has been saved. | |
* | |
* This method sends a registration email to new users created in the backend. | |
* | |
* @param array $user Holds the new user data. | |
* @param boolean $isnew True if a new user is stored. | |
* @param boolean $success True if user was succesfully stored in the database. | |
* @param string $msg Message. | |
* | |
* @return void | |
* @since 1.6 | |
*/ | |
public function onUserAfterSave($user, $isnew, $success, $msg) { | |
//$_POST conten todos os dados enviados apoos um usuario ter sido cadastrado com sucesso | |
//Nesse tipo de plugin da pra fazer rotinas adicionais, como cadastrar em outra tabela | |
//e afins | |
//Caso queira fazer algo a cada login/logout, o ideal é usar plugin do tipo autenticacao | |
print_r($_POST); | |
die(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment