diff --git a/common/models/User/ApprovalRequest.php b/common/models/User/ApprovalRequest.php index e7599703..9599b9a9 100644 --- a/common/models/User/ApprovalRequest.php +++ b/common/models/User/ApprovalRequest.php @@ -53,7 +53,7 @@ public function attributeLabels() public function rules() { return array_merge(parent::rules(), array( - array('userId, dateCreated', 'required'), + array('userId, role, dateCreated', 'required'), )); } diff --git a/web/controllers/AuthController.php b/web/controllers/AuthController.php index 647a91a0..165b9e92 100644 --- a/web/controllers/AuthController.php +++ b/web/controllers/AuthController.php @@ -368,15 +368,6 @@ public function actionSignup() // If no errors, than create and auth user if (!$user->hasErrors()) { - // Send an email notification about new approve required - $approver = $user->getApprover(); - if ($approver) { - \yii::app()->cli->runCommand('email', 'coachOrCoordinatorNotify', array( - 'emailTo' => (string)$approver->email, - 'userId' => (string)$user->_id, - ), array(), true); - } - // Save user $user->save();