invited by filled.
pull/63/head
noud 2012-10-31 10:00:01 +01:00
parent e0a18896e0
commit 1c3ca8909b
1 changed files with 3 additions and 0 deletions

View File

@ -161,6 +161,9 @@ class UsersController extends AppController {
public function admin_add() {
if ($this->request->is('post')) {
$this->User->create();
// set invited by
debug($this->request->data['User']);
$this->request->data['User']['invited_by'] = $this->Auth->user('id');
if ($this->User->save($this->request->data)) {
$this->Session->setFlash(__('The user has been saved'));
$this->redirect(array('action' => 'index'));