Skip to content
Snippets Groups Projects
Commit 3d1fedc5 authored by Brandon Williams's avatar Brandon Williams
Browse files

Fix PHP notice when creating user

parent ad96050d
No related branches found
Tags 7.x-3.0-beta1
No related merge requests found
......@@ -117,7 +117,7 @@ function restrict_by_ip_user_login(&$edit, &$account) {
* Implementation of hook_user_insert().
*/
function restrict_by_ip_user_insert(&$edit, $account, $category) {
if (strlen($edit['restrict_by_ip_address']) > 0) {
if (isset($edit['restrict_by_ip_address']) && strlen($edit['restrict_by_ip_address']) > 0) {
// If an IP restriction is set, add it to database
db_query("INSERT INTO {restrict_by_ip} (uid, restrict_by_ip_address) VALUES (:uid, :ip)", array(':uid' => $edit['uid'], $edit['restrict_by_ip_address']));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment