Hello mates,
I have a problem. After creating my own registration form (following yii-user-management docs), I try to render it but the controller renders the registration view from the module, not mine. I don’t know where is the problem, I show you my RegistrationController.php
Yii::import(
'application.modules.registration.controllers.YumRegistrationController');
class RegistrationController extends YumRegistrationController
{
public function actionRegistration() {
Yii::import('application.modules.profile.models.*');
$profile = new YumProfile;
if (isset($_POST['Profile'])) {
$profile->attributes = $_POST['YumProfile'];
if($profile->save())
$user = new YumUser;
$password = YumUser::generatePassword();
// we generate a dummy username here, since yum requires one
$user->register(md5($profile->email), $password, $profile);
$this->sendRegistrationEmail($user, $password);
Yum::setFlash('Thank you for your registration. Please check your email.');
$this->redirect(Yum::module()->loginUrl);
}
$this->render('registration', array(
'profile' => $profile,
)
);
}
I have done all exactly as it says.
Hope someone can help me. Thank you.