Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
5f58ed3d
Commit
5f58ed3d
authored
Mar 19, 2012
by
jhodgdon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1483664
by nmudgal, chertzog: Fix hook_user_presave example so it actually would work
parent
7083dd10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
core/modules/user/user.api.php
core/modules/user/user.api.php
+3
-2
No files found.
core/modules/user/user.api.php
View file @
5f58ed3d
...
...
@@ -243,9 +243,10 @@ function hook_user_operations() {
* @see hook_user_update()
*/
function
hook_user_presave
(
&
$edit
,
$account
)
{
// Make sure that our form value 'mymodule_foo' is stored as 'mymodule_bar'.
// Make sure that our form value 'mymodule_foo' is stored as
// 'mymodule_bar' in the 'data' (serialized) column.
if
(
isset
(
$edit
[
'mymodule_foo'
]))
{
$edit
[
'data'
][
'my
_
module_
foo
'
]
=
$edit
[
'my
_
module_foo'
];
$edit
[
'data'
][
'mymodule_
bar
'
]
=
$edit
[
'mymodule_foo'
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment