This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Need help with user_save hook - deleting info from another user's account

I've saved some info to a user's account with my module, now I'm trying to create a link to delete that info while logged in as admin but I can't get my head around it.

The user has the information saved using:
user_save($user,array("type"=>$type));

This will set the user's type by using the data stored in $type. Now I am logged in as admin, and want to delete that particular user's type from their account. If the user had the user id '12' how would I delete that data from the user's account?

Thanks

I need a module where I can list all nodes that users have added, e.g: "My nodes" - Any ideas?

Hey everyone,

I'm using Drupal 5.1. I have a web site where people can submit their poetry as poems. Each node is a poem, the type of node is a story. The site has been up for a couple of weeks. The #1 complaint that I get from users is how there's no easy way to find the poems they have added to the site.

Adding another element in form

I want to use google maps on my site. How can I put it on the form? I mean that I want it to be shown when I'm adding new item, using _form function.

Is there a way to add tabs without using the menu hook?

Is there a way to create a tab that maps to a node without adding it via a menu hook?

I'm working on the multiforms module which creates a multi-page form node type. I'd like to see if I can map a form created with it to a tab in a user's profile. I could add functionality in my module to do this, but maybe there's a way to do it without doing that (another contributed module, for example)?

Thanks all!

Something Like "Quotes" Module

Hi,

I want something like "Quotes" module but more complicated. I use "Quotes" module in my site but I want to display sentences in another separated department in the site.

Does drupal.org have a similar one?

Thanks.

nodeapi case 'files': ??

Now i have a code like so...

function tutorial_nodeapi(&$node, $op, $teaser, $page) {
switch ($op) {
case 'load':
return db_fetch_array(db_query('SELECT parent, weight FROM {tutorial} WHERE vid = %d', $node->vid));
break;
case 'view':
if (!$teaser) {
if (isset($node->parent)) {
$path = tutorial_location($node);
// Construct the breadcrumb:
$node->breadcrumb = array(); // Overwrite the trail with a tutorial trail.
foreach ($path as $level) {
$node->breadcrumb[] = array('path' => 'node/'. $level->nid, 'title' => $level->title);
}
$node->breadcrumb[] = array('path' => 'node/'. $node->nid);

$node->content['tutorial_navigation'] = array(
'#value' => theme('tutorial_navigation', $node),
'#weight' => 100,
);

if ($page) {
menu_set_location($node->breadcrumb);
}
}
}
break;
case 'update':
if (isset($node->parent)) {
if ($node->revision) {
db_query("INSERT INTO {tutorial} (nid, vid, parent, weight) VALUES (%d, %d, %d, %d)", $node->nid, $node->vid, $node->parent, $node->weight);
}
else {

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions