Adds log for user invitations

This commit is contained in:
Maxi Redigonda 2019-10-29 16:11:37 -03:00
parent 7eae717b0c
commit 18be18ebf8
4 changed files with 6 additions and 2 deletions

View File

@ -23,6 +23,7 @@ class ActivityRow extends React.Component {
'EDIT_SETTINGS',
'SIGNUP',
'INVITE',
'ADD_TOPIC',
'ADD_ARTICLE',
'DELETE_TOPIC',
@ -106,6 +107,7 @@ class ActivityRow extends React.Component {
'EDIT_SETTINGS': 'wrench',
'SIGNUP': 'user-plus',
'INVITE': 'user-plus',
'ADD_TOPIC': 'book',
'ADD_ARTICLE': 'book',
'DELETE_TOPIC': 'book',

View File

@ -234,6 +234,7 @@ export default {
'ACTIVITY_EDIT_SETTINGS': 'edited settings',
'ACTIVITY_SIGNUP': 'signed up',
'ACTIVITY_INVITE': 'invited user',
'ACTIVITY_ADD_TOPIC': 'added topic',
'ACTIVITY_ADD_ARTICLE': 'added article',
'ACTIVITY_DELETE_TOPIC': 'deleted topic',

View File

@ -102,7 +102,8 @@ class InviteUserController extends Controller {
'userId' => $userId,
'userEmail' => $this->userEmail
]);
// TODO: Log::createLog('SIGN_UP', null, User::getDataStore($userId));
Log::createLog('INVITE', $this->userName);
} else {
throw new RequestException(ERRORS::MAIL_SENDER_NOT_CONNECTED);
}

View File

@ -26,7 +26,7 @@ class Log extends DataStore {
];
}
public static function createLog($type,$to, $author = null) {
public static function createLog($type, $to, $author = null) {
if($author === null) {
$author = Controller::getLoggedUser();
}