/** * edit_user * * @param mixed $id the unique identifier * * @access public * @return string */ function edit_user($id) { i_am_logged(); $user = fetch_or_404('User', $id); if (is_post()) { $user->fromArray($_POST); if ($user->isValid()) { $user->save(); return redirect('/user/page/' . $user->id); } else { $errors = array(); $errors['user'] = get_errors($user); } } return render('user_edit.tpl', compact('user', 'errors')); }
/** * actions * * @access public * @return string */ function actions() { i_am_logged(); return render('settings.tpl', array()); }