mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update the user_type when the value is null
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2021
|
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -235,6 +235,19 @@ if ($domains_processed == 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update the user_type when the value is null
|
||||||
|
$sql = "select count(*) from v_users ";
|
||||||
|
$sql .= "where user_type is null; ";
|
||||||
|
$database = new database;
|
||||||
|
$num_rows = $database->select($sql, null, 'column');
|
||||||
|
if ($num_rows > 0) {
|
||||||
|
$sql = "update v_users ";
|
||||||
|
$sql .= "set user_type = 'default' ";
|
||||||
|
$sql .= "where user_type is null;";
|
||||||
|
$database = new database;
|
||||||
|
$database->execute($sql, null);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user