Hey im new to the Yii so sorry if any of questions sound stupid. I created a model called User using the CRUD setup. Basically allows users to register. I was wondering if anyone could tell me how to have that the once the user creates their account, an email is then sent to the administrator (myself) saying a new user has registered.
I would imagine it would go into this function in the controller?
public function actionCreate()
{
$model=new User;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['User']))
{
$model->attributes=$_POST['User'];
if($model->save())
$this->redirect(array('view','id'=>$model->userId));
}
$this->render('create',array('model'=>$model,'isAdmin'=>!Yii::app()->user->isGuest));
}