Typo3 확장 프로그램에서 사용자를 프로그래밍 방식으로 만들거나 삭제할 수 있습니까 (, SQL 제외)?TYPO3 - 프로그래밍 방식으로 사용자 만들기
2
A
답변
1
몇 가지 코드 예제 :
function createUser() {
// TypoScript Template mit userid anlegen
// Neue Seite anlegen
$tmpId = 'NEWuser478d8d';
$data['be_users'][$tmpId] = array(
'username' => $this->email,
'password' => $this->password,
'admin' => 0,
'pid' => 0,
'usergroup' => $this->usergroup,
'lang' => 'de',
'email' => $this->email,
'db_mountpoints' => '',
'realName' => $this->realName,
'file_mountpoints' => '',
'fileoper_perms' => (int)$this->conf['fileoper_perms'],
'options' => '2', // mount from group: filemount, aber nicht dbmount
'db_mountpoints' => $this->dbMountPage,
'file_mountpoints' => $this->conf['file_mountpoints'],
'workspace_perms' => 0,
'workspace_id' => 0,
'workspace_preview' => 0
);
$this->debug($data, 'beuser');
$this->tce->start($data,array());
$this->tce->process_datamap();
$this->userid = $this->tce->substNEWwithIDs[$tmpId];
// t3lib_div::debug('Neue Userid:'.$this->userid);
return true;
}
afair 당신은 활성 인 BE-사용자가 필요하므로 하나 만들 :
/**
* Creates a Be-User
*
* @return void
*/
function setBeUser() {
global $BE_USER;
unset($BE_USER);
$BE_USER = t3lib_div::makeInstance('t3lib_beUserAuth');
$BE_USER->OS = TYPO3_OS;
$BE_USER->setBeUserByUid($this->conf['setBeUserByUid']);
$BE_USER->fetchGroupData();
$BE_USER->backendSetUC();
$GLOBALS['BE_USER'] = $BE_USER;
$GLOBALS['LANG'] = t3lib_div::makeInstance('language');
$GLOBALS['LANG']->init($BE_USER->uc['lang']);
return $BE_USER;
}
초기화 TCE :
$this->tce = t3lib_div::makeInstance('t3lib_TCEmain');
$this->tce->BE_USER = $this->setBeUser();
$this->tce->stripslashes_values = 0;
$this->createUser();
+0
pa-ddy, 여기 백엔드 또는 프런트 엔드 사용자에 대해 이야기하고 있습니까? – SimonSimCity
+0
$ data [ 'be_users']는 "백엔드 사용자"를 의미합니다 $ data [ 'fe_users']는 Frontend 사용자를 의미하지만 필드를 확인합니다. – maholtz
2
CRUD 프론트 엔드로를 사용자 (fe_users)는 이미 자신의 Extbase 확장에서 사용할 수있는 저장소와 모델을 사용할 수 있습니다. 다음은 ...
TYPO3/sysext/extbase/클래스/도메인
당신은 모델 및 저장소 클래스를 찾을 수 있습니다.
관련 문제
- 1. Wordpress, 프로그래밍 방식으로 사용자 만들기
- 2. 프로그래밍 방식으로 사이트 만들기
- 3. 프로그래밍 방식으로 CustomField 만들기
- 4. 프로그래밍 방식으로 여러 사용자 클래스 만들기
- 5. 프로그래밍 방식으로 사용자 지정 요소로 격자 만들기
- 6. 사용자 지정 프로그래밍 방식으로 차트 만들기 FetchXML
- 7. 프로그래밍 방식으로 사용자 지정된 UIView 만들기
- 8. 프로그래밍 방식으로 vTiger 6에서 사용자 만들기
- 9. iPhone - 프로그래밍 방식으로 사용자 정의 TableView 만들기
- 10. 프로그래밍 방식으로 사용자 정의 DialogPreference 만들기
- 11. Typo3 extbase : 프로그래밍 방식으로 레코드 PID 변경
- 12. 프로그래밍 방식으로 UINavigationController 만들기
- 13. 프로그래밍 방식으로 UINavigationBar 만들기
- 14. 프로그래밍 방식으로 dataList 만들기
- 15. 프로그래밍 방식으로 주문 만들기
- 16. 프로그래밍 방식으로 데이터베이스 만들기
- 17. 프로그래밍 방식으로 UIImageView 만들기
- 18. 프로그래밍 방식으로 mapView 만들기
- 19. 프로그래밍 방식으로 인덱스 만들기
- 20. 프로그래밍 방식으로 UISwitch 만들기
- 21. 프로그래밍 방식으로 UISearchDisplayController 만들기
- 22. 프로그래밍 방식으로 뷰 만들기
- 23. 프로그래밍 방식으로 UIScrollView 만들기
- 24. 프로그래밍 방식으로 UIToolbar 만들기
- 25. 프로그래밍 방식으로 TouchList 만들기
- 26. 프로그래밍 방식으로 텍스처 만들기
- 27. 프로그래밍 방식으로 UIView 만들기
- 28. 프로그래밍 방식으로 컨트롤러 만들기
- 29. 프로그래밍 방식으로 plist 만들기
- 30. 프로그래밍 방식으로 Windows 세션 만들기
SQL이 없다면 무엇을 의미합니까? TYPO3 사용자는 데이터베이스에 저장되므로 SQL 명령을 작성하거나 삭제하려면 SQL 명령 끝에 필요합니다. –
나는 TYPO3 함수를 사용하여 사용자를 추가 할 수있을 것이라고 생각 했습니까? (TYPO3 API?) –
나를위한 한 가지 질문은 "왜?"입니다. ... TYPO3가 fe_users 또는 be_users의 DB 구조를 변경한다고 생각하지 않기 때문에 ... 그렇지 않으면 많이 (그리고 실제로는 많이) 확장이 중단됩니다. – SimonSimCity