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

creating own user module broke site

Hi All,

I created a /sites/all/modules/user module and logged in to the admin section then logged out now all i get when i access the site is Fatal error: Call to undefined function: user_access() in /modules/statistics/statistics.module on line 105

I deleted my custom module in /sites/all/modules/ thinking all would be good but it is still displaying the error message.

my custom module was as follows:

/sites/all/modules/user/user.info

Customising User Registration

Hi All,

I have been reading the forms api and the module developers guide in the the handbook section on the site and their is something I am having trouble with.

I am trying to modify ./modules/user/user.module to show the help text at the top of the screen instead of in the middle. To see what I mean check out my site at http://www.irwinresources.com/user/register

I realise that you are not meant to change core modules but I believe it is the only way to do what I want.

The drupal_get_form('user_register'); returns the following:


Array ( [user_registration_help] => Array ( [#value] =>
Hello and Welcome

By creating an account you will be able to do many cool things which may expand to more and more over time depending on how much of a control freak I want to be over my web site. It also allows me to know how many people are comming to the site and what your contact details are if I don't have them already.

NOTE: If you make your username your name then it will appear when you make posts and comments etc.

If your some weird guy or girl from some other country other then Australia that I don't know then I guess you can just put crap in for the mobile number but you will need a correct email address to recieve your login password.
)

is lm_paypal still the only module that is worth using for paid subscriptions?

i've used lm_paypal for my site searcy.com, but I'm still wishing there was a generic subscription module...is there anything new out there? last time i checked the ecommerce module didnt really work right.

Forginc node_save NOT to create a new revision

Hello,

I am re-developing node_article.module (used by Free Software Magazine) for Drupal 5.x.
I am basically rewriting it so that it follows all of the coding standards and follows Drupal's "philosophy" (my previous version was a bit of a hack, which worked fine but it was nevertheless a hack).

Now: in my module, I need to have the option of doing:

node_save($node)

WITHOUT creating a new revision.
Right now, this is what I do:

$node->hack_dont_save_revisions = 1;
$node_save($node)

Localization of dynamic variables

I'm trying to localize 'categories' in contact.module. But the code: (contact.module, contact_mail_page())

  while ($category = db_fetch_object($result)) {
    $categories[$category->cid] = t($category->category);
     }

doesn't work. Should t($var) work, at all? I've noticed that localization of content type names doesn't work too...

Add user with my own Add script

Hello,

I made a little module that creates a form, checks the values and adds, if validated, the information in a different database than the one used by Drupal.

In this same module, I'd like to be able to create a user the same way as an *admin* would do through the configuration bar (administer->users->add user). That means: no password sent by email and no admin account validation.

I don't really understand how i could do this.

Can/Do i have to manually add login information directly to the drupals database ? I looked at the database if it was easy understanding values when a user is added but... it saw this for one of the fields:

a:4:{s:6:"notify";i:0;s:6:"submit";s:18:"Create new Account";s:10:"form_token";s:32:"7ef648112c04bc1d3596051811a9264d";s:7:"form_id";s:13:"user_register";}

So i thought i should rather use the drupals specific functions to add the login information ?

And we shouldn't forget that this script/form is launched by a unregistered user...

I did try to create this form from the different values gathered in the first one...

$output .= "\n".'
'."\n";
$output .= ''."\n";

Pages

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