Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Das Hinzufügen des Benutzers kann über folgenden SQL Befehl erfolgen. Auch hier ist die BenutzerId auszufüllen.

Code Block
languagesql
INSERT INTO eventstream_usermngt (timestamp, identifier, action, app, event_type, payload, user_id, user_name)
SELECT 
		utc_timestamp() as timestamp,
		LOWER(id) as identifier,
		"Manually Added by Support" as action,
		"Navicat" as app,
		2 as event_type, 
		CONCAT_WS ("", "{", CHAR(13), CHAR(10),
						' "UserId":', id, ",", CHAR(13), CHAR(10),
						' "Division":', '"', division, '"', ",",CHAR(13), CHAR(10),
						' "UserName":', '"', username, '"', ",",CHAR(13), CHAR(10),
						' "FirstName":', '"', firstname, '"', ",",CHAR(13), CHAR(10),
						' "LastName":', '"', lastname, '"', ",",CHAR(13), CHAR(10),
						' "Acronym":', '"', shortcut, '"', ",",CHAR(13), CHAR(10),
						' "Mail":', '"', email, '"', ",",CHAR(13), CHAR(10),
						' "Telephone":', '"', phone, '"', ",",CHAR(13), CHAR(10),
						' "Comment":', '"', comment, '"', ",",CHAR(13), CHAR(10),
						' "IsInvisible":', IF(invisible=0,false, true), ",",CHAR(13), CHAR(10),
						' "Location":', '"', location, '"', ",",CHAR(13), CHAR(10),
						' "Position":', '"', position, '"', ",",CHAR(13), CHAR(10),
						' "ExternalTelephone":', '"', external_phone, '"', ",",CHAR(13), CHAR(10),
						' "Fax":', '"', fax, '"', ",",CHAR(13), CHAR(10),
						"}") as payload, 
		0 as user_id,
		"Support" as user_name
FROM user
where id = <userId>

Nachdem die Abfrage ausgeführt wurde, kann mit der ersten Abfrage das Ergebnis validiert werden. Ist hier nun der Eintrag vorhanden, dann kann der Benutzer im nächsten Schritt im Administrator aktiviert werden.