DrupalBin
Submit Code
About
Recent Posts
Code
Fix for Fix for Code
Fix for Code
Code
Node type whitelist
an axe coach accessories
coach purses married
Fix for de las ghd alturas
de las ghd alturas
Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
hook_user
Checkmember_user
November 19, 2010 - 6:31pm — Anonymous
<?php
function
checkmember_user
(
$op
,
&
$edit
,
&
$user
,
$category
=
null
)
{
if
(
$op
==
"insert"
||
$op
==
"update"
)
{
// clear first
db_query
(
'DELETE FROM {users_roles} WHERE uid = %d'
,
drupal
hook_user
Read more
CiviCRM hook_user to not set an empty $_SESSION["civicrm"] for anonymous users - needed for Pressflow
January 15, 2010 - 3:33pm —
EvanDonovan
function
civicrm_user
(
$type
,
&
$edit
,
&
$user
,
$category
=
NULL
)
{
$current_user
=
$_GLOBALS
[
"user"
]
;
if
(
$current_user
-
>
uid
== 0
&&
(
arg
(
0
)
==
"user"
&&
is_numeric
(
arg
(
1
)
)
)
)
{
retur
civicrm
cookie
hack
hook_user
pressflow
session
Read more
Fix for CiviCRM hook_user to not set an empty $_SESSION["civicrm"] for anonymous users - needed for Pressflow
January 15, 2010 - 3:32pm —
EvanDonovan
function
civicrm_user
(
$type
,
&
$edit
,
&
$user
,
$category
=
NULL
)
{
$current_user
=
$_GLOBALS
[
"user"
]
;
if
(
$current_user
-
>
uid
== 0
&&
(
arg
(
0
)
==
"user"
&&
is_numeric
(
arg
(
1
)
)
)
)
{
retur
civicrm
cookie
hack
hook_user
pressflow
session
Read more
Insert Form Values not Object Ones
September 15, 2009 - 4:26pm — Anonymous
/**
* Implementation of hook_user()
*/
function
profile_edit_stats_user
(
$op
,
&
$edit
,
&
$account
,
$category
=
NULL
)
{
switch
(
$op
)
{
case
'insert'
:
$timestamp
=
time
(
)
;
//get timestamp
hook_user
Read more
This is simplemodule.module . It only has 3 lines of code. not working :(
March 17, 2008 - 3:37am — Anonymous
<?php
# vim: set filetype=php expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
function
simplemodule_user
(
$op
,
&
$edit
,
&
$account
,
$category
=
NULL
)
{
hook_user
module
user_access
Read more