diff --git a/~dev_rating/application/classes/Controller/Api/V0/Teacher.php b/~dev_rating/application/classes/Controller/Api/V0/Teacher.php
index 6c49cc915c1f5aafb2589b1b48ca2715978c6e65..17602abea41941a705f67f10443ca5c66720dcd8 100644
--- a/~dev_rating/application/classes/Controller/Api/V0/Teacher.php
+++ b/~dev_rating/application/classes/Controller/Api/V0/Teacher.php
@@ -76,8 +76,11 @@ class Controller_Api_V0_Teacher extends Controller_Handler_Api {
             $teacher = $teacher->inila($teacherData->inila);
         }
         $teacher = $teacher->create();
-
-        return (int)$teacher->ID;
+        if (isset($teacher->ActivationCode)) {
+            return [(int)$teacher->ID, $teacher->ActivationCode];
+        } else {
+            return (int)$teacher->ID;
+        }
     }
 
     private function updateTeacher($teacherData) {
diff --git a/~dev_rating/application/classes/Model/Teacher.php b/~dev_rating/application/classes/Model/Teacher.php
index 492bc123fda9a54c8b9f6d368f8fa6168d19c20e..efeb763a1644ea986afb1281b160545f501ad6dc 100644
--- a/~dev_rating/application/classes/Model/Teacher.php
+++ b/~dev_rating/application/classes/Model/Teacher.php
@@ -71,6 +71,9 @@ class Model_Teacher extends Model_Container
                 ->parameters($this->data)
                 ->execute()->get('ID');
         } else {
+            if (!isset($this->data["DepID"])) {
+                $this->DepID = $this->data['FacultyID'];
+            }
             $sql = 'SELECT * FROM Teacher_Create(LastName, FirstName, SecondName, JobPositionID, DepID, 
                                                 ActivationCode) AS "ID"';